<?php  
$cedula=$_POST['cedula'];
function Conectarse()

{

   if (!($link=mysql_connect("localhost","root","lenier2")))

   {

      

      exit();

   }

   if (!mysql_select_db("HSEQ",$link))

   {

     

      exit();

   }

   return $link;

}



$link=Conectarse();





if(isset($_POST['accion'])){

	$accion=$_POST['accion'];

}

else {
}



if($accion=='Buscar'){




/* ----------------------------------------AUDIOMETRIA-----------------------------   */
$myresult = mysql_query("SELECT cliente.p_nom_cliente,audiometria.id_audiometria,audiometria.his_cod_historia_clinica, audiometria.normal_aud,audiometria.anormal_aud,audiometria.observaciones_aud,audiometria.diag_aud  FROM cliente INNER JOIN (historia_clinica INNER JOIN audiometria ON audiometria.his_cod_historia_clinica = historia_clinica.cod_historia_clinica) ON historia_clinica.cod_historia_clinica = cliente.historia_clinica_cod_historia_clinica WHERE cliente.ced_cliente = $cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult); $i++) 

{

	$id_aud = mysql_result($myresult, $i, 1);
	$cod_his = mysql_result($myresult, $i, 2);
	$n_aud = mysql_result($myresult, $i, 3);
	$an_aud = mysql_result($myresult, $i, 4);
	$obs_aud = mysql_result($myresult, $i, 5);
	$diag_aud = mysql_result($myresult, $i, 6);
	
}

$myresult3 = mysql_query("SELECT cliente.p_nom_cliente,vestibular.id_vestibular,vestibular.his_cod_historia_clinica,vestibular.normal_ves,vestibular.anormal_ves,observaciones_anormal_ves  FROM cliente INNER JOIN (historia_clinica INNER JOIN vestibular ON vestibular.his_cod_historia_clinica = historia_clinica.cod_historia_clinica) ON historia_clinica.cod_historia_clinica = cliente.historia_clinica_cod_historia_clinica WHERE cliente.ced_cliente = $cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult3); $i++) 

{

	$no_ves = mysql_result($myresult3, $i, 3);
	$ano_ves = mysql_result($myresult3, $i, 4);
	$ob_ves = mysql_result($myresult3, $i, 5);
}

//echo $n_aud;
$myresult2= mysql_query("SELECT p_nom_cliente FROM cliente WHERE ced_cliente=$cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult2); $i++) 

{

	$nom = mysql_result($myresult2, $i, 0);
}

if($nom==null){
$alert2="No se encontro usuario, ingreselo primero. ";

}
else if($id_aud ==null && $nom!=null)
{
$alert="Este usuario aun no cuenta con examen de audiometria";
}
//////////////////////////////////////////////////////////////////////////////


$myresult = mysql_query("SELECT cliente.p_nom_cliente,visiometria.id_vis,visiometria.his_cod_historia_clinica,visiometria.od_cerca_cc,visiometria.od_cerca_sc,visiometria.oi_cerca_cc,visiometria.oi_cerca_sc,visiometria.od_lejos_cc,visiometria.od_lejos_sc,visiometria.oi_lejos_cc,visiometria.oi_lejos_sc,visiometria.hallazgos,visiometria.diag_visi  FROM cliente INNER JOIN (historia_clinica INNER JOIN visiometria ON visiometria.his_cod_historia_clinica = historia_clinica.cod_historia_clinica) ON historia_clinica.cod_historia_clinica = cliente.historia_clinica_cod_historia_clinica WHERE cliente.ced_cliente = $cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult); $i++) 
{
	$id_vi = mysql_result($myresult, $i, 1);
	$cod_his = mysql_result($myresult, $i, 2);
	$od_c_c = mysql_result($myresult, $i, 3);
	$od_c_s = mysql_result($myresult, $i, 4);
	$oi_c_c = mysql_result($myresult, $i, 5);
	$oi_c_s = mysql_result($myresult, $i, 6);
	$od_l_c = mysql_result($myresult, $i, 7);
	$od_l_s = mysql_result($myresult, $i, 8);
	$oi_l_c = mysql_result($myresult, $i, 9);
	$oi_l_s = mysql_result($myresult, $i, 10);
	$hall_visi = mysql_result($myresult, $i, 11);
	$diag_visi = mysql_result($myresult, $i, 12);
}

/*--------------------------------------BACTERIOLOGIA-----------------------------*/



$myresult = mysql_query("SELECT cliente.p_nom_cliente,paraclinicos.serologia,paraclinicos.frotis_faringeo,paraclinicos.koh,paraclinicos.coprologico,paraclinicos.parcial_orina,paraclinicos.perfil_lipidico,paraclinicos.cuadro_hematico,paraclinicos.impresion_diagnostica  FROM cliente INNER JOIN (historia_clinica INNER JOIN paraclinicos ON paraclinicos.his_cod_historia_clinica = historia_clinica.cod_historia_clinica) ON historia_clinica.cod_historia_clinica = cliente.historia_clinica_cod_historia_clinica WHERE cliente.ced_cliente = $cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult); $i++) 

{

	$sero = mysql_result($myresult, $i, 1);
	$fro = mysql_result($myresult, $i, 2);
	$koh = mysql_result($myresult, $i, 3);
	$co = mysql_result($myresult, $i, 4);
	$par = mysql_result($myresult, $i, 5);
	$lip = mysql_result($myresult, $i, 6);
	$cua_h = mysql_result($myresult, $i, 7);
	$imp_dig = mysql_result($myresult, $i, 8);
	
}

//echo $hall_visi;
$myresult2= mysql_query("SELECT p_nom_cliente FROM cliente WHERE ced_cliente=$cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult2); $i++) 

{

	$nom = mysql_result($myresult2, $i, 0);
}

if($nom==null){
$alert2="No se encontro usuario, ingreselo primero. ";
}
else if($sero ==null && $nom!=null)
{
$alert="Este usuario aun no cuenta con examen de bacteriologa";
}
/*---------------------------------ENFERMERA-----------------------------------*/


$myresult = mysql_query("SELECT arp, eps FROM cliente WHERE ced_cliente=$cedula;",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult); $i++) 
	{
		$arp = mysql_result($myresult, $i, 0);
		$eps = mysql_result($myresult, $i, 1);
	}



$myresult2=mysql_query("SELECT empresa_anterior.nom_empresa_anterior,empresa_anterior.nom_cargo_anterior,empresa_anterior.tiempo_cargo_anterior,empresa_anterior.nom_empresa_anterior2,empresa_anterior.nom_cargo_anterior2,empresa_anterior.tiempo_cargo_anterior2,empresa_anterior.nom_empresa_anterior3,empresa_anterior.nom_cargo_anterior3,empresa_anterior.tiempo_cargo_anterior3 FROM empresa_anterior, cliente where empresa_anterior.cliente_ced_cliente=cliente.ced_cliente and cliente.ced_cliente=$cedula;",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult2); $i++) 
	{
		$ea = mysql_result($myresult2, $i, 0);
		$c_ante = mysql_result($myresult2, $i, 1);
		$ta = mysql_result($myresult2, $i, 2);
		$ea2 = mysql_result($myresult2, $i, 3);
		$ca2 = mysql_result($myresult2, $i, 4);
		$ta2 = mysql_result($myresult2, $i, 5);
		$ea3 = mysql_result($myresult2, $i, 6);
		$ca3 = mysql_result($myresult2, $i, 7);
		$ta3 = mysql_result($myresult2, $i, 8);
	}
  $sql = mysql_query("SELECT historia_clinica.cod_historia_clinica FROM historia_clinica,cliente WHERE historia_clinica.cod_historia_clinica= 		  cliente.historia_clinica_cod_historia_clinica and cliente.ced_cliente = $cedula", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{
	$cod_his= mysql_result($sql, $i, 0);
}

$myresult3=mysql_query("SELECT accidentes_trabajo.id_acc_trab,accidentes_trabajo.acc_trab,accidentes_trabajo.fecha_acc_trab,accidentes_trabajo.empresa_acc_trab,accidentes_trabajo.causa_acc_trab,accidentes_trabajo.tipo_acc_trab,accidentes_trabajo.parte_acc_trab,accidentes_trabajo.inc_acc_trab,accidentes_trabajo.secuelas_acc_trab,accidentes_trabajo.his_cod_historia_clinica FROM accidentes_trabajo, historia_clinica WHERE accidentes_trabajo.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and accidentes_trabajo.his_cod_historia_clinica=$cod_his",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult3); $i++) 
{
	$id_acc_trabajo= mysql_result($myresult3, $i, 0);	
	$at= mysql_result($myresult3, $i, 1);
	$fat= mysql_result($myresult3, $i, 2);
	$eat= mysql_result($myresult3, $i, 3);
	$cat= mysql_result($myresult3, $i, 4);
	$tat= mysql_result($myresult3, $i, 5);
	$pat= mysql_result($myresult3, $i, 6);
	$iat= mysql_result($myresult3, $i, 7);
	$sat= mysql_result($myresult3, $i, 8);
	$id_hist_acc_traba= mysql_result($myresult3, $i, 9);
	}


if($fat!=null ){
$id_acc_trabajo=$id_acc_trabajo-1;

$myresult3a=mysql_query("SELECT accidentes_trabajo.id_acc_trab,accidentes_trabajo.acc_trab,accidentes_trabajo.fecha_acc_trab,accidentes_trabajo.empresa_acc_trab,accidentes_trabajo.causa_acc_trab,accidentes_trabajo.tipo_acc_trab,accidentes_trabajo.parte_acc_trab,accidentes_trabajo.inc_acc_trab,accidentes_trabajo.secuelas_acc_trab,accidentes_trabajo.his_cod_historia_clinica FROM accidentes_trabajo, historia_clinica WHERE accidentes_trabajo.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and accidentes_trabajo.his_cod_historia_clinica=$id_hist_acc_traba and accidentes_trabajo.id_acc_trab=$id_acc_trabajo" ,$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult3a); $i++) 
{
	$id_acc_trabajo1= mysql_result($myresult3a, $i, 0);	
	$at1= mysql_result($myresult3a, $i, 1);
	$fat1= mysql_result($myresult3a, $i, 2);
	$eat1= mysql_result($myresult3a, $i, 3);
	$cat1= mysql_result($myresult3a, $i, 4);
	$tat1= mysql_result($myresult3a, $i, 5);
	$pat1= mysql_result($myresult3a, $i, 6);
	$iat1= mysql_result($myresult3a, $i, 7);
	$ssat1= mysql_result($myresult3a, $i, 8);
	$id_hist_acc_traba1= mysql_result($myresult3a, $i, 9);
	}

$id_acc_trabajo=$id_acc_trabajo-1;

$myresult3b=mysql_query("SELECT accidentes_trabajo.id_acc_trab,accidentes_trabajo.acc_trab,accidentes_trabajo.fecha_acc_trab,accidentes_trabajo.empresa_acc_trab,accidentes_trabajo.causa_acc_trab,accidentes_trabajo.tipo_acc_trab,accidentes_trabajo.parte_acc_trab,accidentes_trabajo.inc_acc_trab,accidentes_trabajo.secuelas_acc_trab,accidentes_trabajo.his_cod_historia_clinica FROM accidentes_trabajo, historia_clinica WHERE accidentes_trabajo.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and accidentes_trabajo.his_cod_historia_clinica=$id_hist_acc_traba and accidentes_trabajo.id_acc_trab=$id_acc_trabajo" ,$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult3b); $i++) 
{
	$id_acc_trabajo2= mysql_result($myresult3b, $i, 0);	
	$at2= mysql_result($myresult3b, $i, 1);
	$fat2= mysql_result($myresult3b, $i, 2);
	$eat2= mysql_result($myresult3b, $i, 3);
	$cat2= mysql_result($myresult3b, $i, 4);
	$tat2= mysql_result($myresult3b, $i, 5);
	$pat2= mysql_result($myresult3b, $i, 6);
	$iat2= mysql_result($myresult3b, $i, 7);
	$sat2= mysql_result($myresult3b, $i, 8);
	$id_hist_acc_traba2= mysql_result($myresult3b, $i, 9);
	}
}

$myresult4=mysql_query("SELECT enfermedad_profesional.enf_pro,enfermedad_profesional.fecha_enf_pro,enfermedad_profesional.empresa_enf_pro,enfermedad_profesional.diagnostico_enf_pro,enfermedad_profesional.indemnizacion_enf_pro,enfermedad_profesional.reubicacion_enf_pro FROM enfermedad_profesional,historia_clinica WHERE enfermedad_profesional.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and enfermedad_profesional.his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult4); $i++) 
{
	$eprofe= mysql_result($myresult4, $i, 0);
	$fep= mysql_result($myresult4, $i, 1);
	$eep= mysql_result($myresult4, $i, 2);
	$dep= mysql_result($myresult4, $i, 3);
	$iep= mysql_result($myresult4, $i, 4);
	$rep= mysql_result($myresult4, $i, 5);
}
$myresult5=mysql_query("SELECT antecedentes_familiares.hta, antecedentes_familiares.phta,antecedentes_familiares.infarto,antecedentes_familiares.pinfarto,antecedentes_familiares.acv,antecedentes_familiares.pacv,antecedentes_familiares.diabetes,antecedentes_familiares.pdiabetes,antecedentes_familiares.asma,antecedentes_familiares.pasma,antecedentes_familiares.tbc,antecedentes_familiares.ptbc,antecedentes_familiares.artritis,antecedentes_familiares.partritis,antecedentes_familiares.enf_mental,antecedentes_familiares.penf_mental,antecedentes_familiares.cancer,antecedentes_familiares.pcancer,antecedentes_familiares.tiroides,antecedentes_familiares.ptiroides,antecedentes_familiares.otros,antecedentes_familiares.potros FROM antecedentes_familiares, historia_clinica WHERE antecedentes_familiares.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and antecedentes_familiares.his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult5); $i++) 
{
	$hta_f= mysql_result($myresult5, $i, 0);
	$phta= mysql_result($myresult5, $i, 1);
	$infarto= mysql_result($myresult5, $i, 2);
	$pinfarto= mysql_result($myresult5, $i, 3);
	$acv= mysql_result($myresult5, $i, 4);
	$pacv= mysql_result($myresult5, $i, 5);
	$diabetes= mysql_result($myresult5, $i, 6);
	$pdiabetes= mysql_result($myresult5, $i, 7);
	$asma= mysql_result($myresult5, $i, 8);
	$pasma= mysql_result($myresult5, $i, 9);
	$tbc_f= mysql_result($myresult5, $i, 10);
	$ptbc_f= mysql_result($myresult5, $i, 11);
	$art_f= mysql_result($myresult5, $i, 12);
	$part= mysql_result($myresult5, $i, 13);		
	$em_f= mysql_result($myresult5, $i, 14);
	$pem= mysql_result($myresult5, $i, 15);
	$can= mysql_result($myresult5, $i, 16);
	$pcan= mysql_result($myresult5, $i, 17);
	$ti_f= mysql_result($myresult5, $i, 18);
	$pti_f= mysql_result($myresult5, $i, 19);
	$otros=mysql_result($myresult5, $i, 20);
	$potros=mysql_result($myresult5, $i, 21);
}
$myresult6=mysql_query("SELECT * FROM antecedentes_personales, historia_clinica WHERE antecedentes_personales.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and antecedentes_personales.his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult6); $i++) 
{
	$ce= mysql_result($myresult6, $i, 2);
	$dv= mysql_result($myresult6, $i, 3);
	$ul= mysql_result($myresult6, $i, 4);
	$so= mysql_result($myresult6, $i, 5);
	$ot= mysql_result($myresult6, $i, 6);
	$si= mysql_result($myresult6, $i, 7);
	$ri= mysql_result($myresult6, $i, 8);
	$co= mysql_result($myresult6, $i, 9);
	$hta= mysql_result($myresult6, $i, 10);
	$ec= mysql_result($myresult6, $i, 11);
	$he= mysql_result($myresult6, $i, 12);
	$ti= mysql_result($myresult6, $i, 13);
	$hi= mysql_result($myresult6, $i, 14);
	$di= mysql_result($myresult6, $i, 15);
	$ep= mysql_result($myresult6, $i, 16);
	$tbc= mysql_result($myresult6, $i, 17);
	$eap= mysql_result($myresult6, $i, 18);
	$sii= mysql_result($myresult6, $i, 19);
	$em= mysql_result($myresult6, $i, 20);
	$su= mysql_result($myresult6, $i, 21);
	$ca= mysql_result($myresult6, $i, 22);
	$her= mysql_result($myresult6, $i, 23);
	$der= mysql_result($myresult6, $i, 24);
	$art= mysql_result($myresult6, $i, 25);
	$lu= mysql_result($myresult6, $i, 26);
	$tu= mysql_result($myresult6, $i, 27);
	$va= mysql_result($myresult6, $i, 28);
	$tro= mysql_result($myresult6, $i, 29);
	$go= mysql_result($myresult6, $i, 30);
	$ale= mysql_result($myresult6, $i, 31);
	$des= mysql_result($myresult6, $i, 32);
}
$myresult7=mysql_query("SELECT * FROM antecedentes_quirurgicos_traumaticos WHERE his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult7); $i++) 
{
	$aqt= mysql_result($myresult7, $i, 2);
	$fqt= mysql_result($myresult7, $i, 3);
	$aqt2= mysql_result($myresult7, $i, 4);
	$fqt2= mysql_result($myresult7, $i, 5);
	$aqt3= mysql_result($myresult7, $i, 6);
	$fqt3= mysql_result($myresult7, $i, 7);
	$aqt4= mysql_result($myresult7, $i, 8);
	$fqt4= mysql_result($myresult7, $i, 9);
}
$myresult8=mysql_query("SELECT * FROM inmunizacion WHERE his_cod_historia_clinica=$cod_his", $link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult8); $i++) 
{
	$hepat= mysql_result($myresult8, $i, 2);
	$f_hepat= mysql_result($myresult8, $i, 3);
	$d_hepat= mysql_result($myresult8, $i, 4);
	$fa= mysql_result($myresult8, $i, 5);
	$ffa= mysql_result($myresult8, $i, 6);
	$dfa= mysql_result($myresult8, $i, 7);
	$carnet= mysql_result($myresult8, $i, 8);
	$tetano= mysql_result($myresult8, $i, 9);
	$ftetano= mysql_result($myresult8, $i, 10);
	$dtetano= mysql_result($myresult8, $i, 11);
	$inf= mysql_result($myresult8, $i, 12);
	$finf= mysql_result($myresult8, $i, 13);
	$dinf= mysql_result($myresult8, $i, 14);
	$otr= mysql_result($myresult8, $i, 15);
}
$myresult9=mysql_query("SELECT * FROM gineco_obs WHERE his_cod_historia_clinica=$cod_his",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult9); $i++) 
{
	$pg= mysql_result($myresult9, $i, 2);
	$pp= mysql_result($myresult9, $i, 3);
	$pa= mysql_result($myresult9, $i, 4);
	$pc= mysql_result($myresult9, $i, 5);
	$pe= mysql_result($myresult9, $i, 6);
	$pm= mysql_result($myresult9, $i, 7);
	$pv= mysql_result($myresult9, $i, 8);
	$mena= mysql_result($myresult9, $i, 9);
	$ciclos= mysql_result($myresult9, $i, 10);
	$fum= mysql_result($myresult9, $i, 11);
	$fup= mysql_result($myresult9, $i, 12);
	$pla= mysql_result($myresult9, $i, 13);
	$mpla= mysql_result($myresult9, $i, 14);
	$cito= mysql_result($myresult9, $i, 15);
	$fecha_cito= mysql_result($myresult9, $i, 16);
	$resu= mysql_result($myresult9, $i, 17);
	
}
$myresult10=mysql_query("SELECT * FROM habitos_toxicos WHERE his_cod_historia_clinica=$cod_his",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult10); $i++) 
{
	$fuma= mysql_result($myresult10, $i, 2);
	$ccig= mysql_result($myresult10, $i, 3);
	$exf= mysql_result($myresult10, $i, 4);
	$tf= mysql_result($myresult10, $i, 5);
	$ba= mysql_result($myresult10, $i, 6);
	$fb= mysql_result($myresult10, $i, 7);
}
$myresult11=mysql_query("SELECT * FROM signos_vitales WHERE his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult11); $i++) 
{
	$rh= mysql_result($myresult11, $i, 2);
	$temp= mysql_result($myresult11, $i, 3);
	$dies =mysql_result($myresult11, $i, 4);
	$ambi =mysql_result($myresult11, $i, 5);
	$zur =mysql_result($myresult11, $i, 6);
	$talla =mysql_result($myresult11, $i, 7);
	$peso =mysql_result($myresult11, $i, 8);
	$fr= mysql_result($myresult11, $i, 9);
	$tasv =mysql_result($myresult11, $i, 10);
	$fc =mysql_result($myresult11, $i, 11);
	$imc= mysql_result($myresult11, $i, 12);
}
$myresult12= mysql_query("SELECT p_nom_cliente FROM cliente WHERE ced_cliente=$cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult12); $i++) 
{
	$nom = mysql_result($myresult12, $i, 0);
}










/////////////////////////////////////////////////////////////////////////////////////////////////
$myresult = mysql_query("SELECT arp, eps FROM cliente WHERE ced_cliente=$cedula;",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult); $i++) 

	{
		$arp = mysql_result($myresult, $i, 0);
		$eps = mysql_result($myresult, $i, 1);
	}
$myresult2=mysql_query("SELECT empresa_anterior.nom_empresa_anterior,empresa_anterior.nom_cargo_anterior,empresa_anterior.tiempo_cargo_anterior,empresa_anterior.nom_empresa_anterior2,empresa_anterior.nom_cargo_anterior2,empresa_anterior.tiempo_cargo_anterior2,empresa_anterior.nom_empresa_anterior3,empresa_anterior.nom_cargo_anterior3,empresa_anterior.tiempo_cargo_anterior3 FROM empresa_anterior, cliente where empresa_anterior.cliente_ced_cliente=cliente.ced_cliente and cliente.ced_cliente=$cedula;",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult2); $i++) 

	{
		$ea = mysql_result($myresult2, $i, 0);
		$c_ante = mysql_result($myresult2, $i, 1);
		$ta = mysql_result($myresult2, $i, 2);
		$ea2 = mysql_result($myresult2, $i, 3);
		$ca2 = mysql_result($myresult2, $i, 4);
		$ta2 = mysql_result($myresult2, $i, 5);
		$ea3 = mysql_result($myresult2, $i, 6);
		$ca3 = mysql_result($myresult2, $i, 7);
		$ta3 = mysql_result($myresult2, $i, 8);
	}
  $sql = mysql_query("SELECT historia_clinica.cod_historia_clinica FROM historia_clinica,cliente WHERE historia_clinica.cod_historia_clinica= 		  cliente.historia_clinica_cod_historia_clinica and cliente.ced_cliente = $cedula", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 

{

	$cod_his= mysql_result($sql, $i, 0);
}

$myresult3=mysql_query("SELECT accidentes_trabajo.acc_trab,accidentes_trabajo.fecha_acc_trab,accidentes_trabajo.empresa_acc_trab,accidentes_trabajo.causa_acc_trab,accidentes_trabajo.tipo_acc_trab,accidentes_trabajo.parte_acc_trab,accidentes_trabajo.inc_acc_trab,accidentes_trabajo.secuelas_acc_trab FROM accidentes_trabajo, historia_clinica WHERE accidentes_trabajo.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and accidentes_trabajo.his_cod_historia_clinica=$cod_his",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult3); $i++) 

{

	$at= mysql_result($myresult3, $i, 0);
	$fat= mysql_result($myresult3, $i, 1);
	$eat= mysql_result($myresult3, $i, 2);
	$cat= mysql_result($myresult3, $i, 3);
	$tat= mysql_result($myresult3, $i, 4);
	$pat= mysql_result($myresult3, $i, 5);
	$iat= mysql_result($myresult3, $i, 6);
	$sat= mysql_result($myresult3, $i, 7);
}
$myresult4=mysql_query("SELECT enfermedad_profesional.enf_pro,enfermedad_profesional.fecha_enf_pro,enfermedad_profesional.empresa_enf_pro,enfermedad_profesional.diagnostico_enf_pro,enfermedad_profesional.indemnizacion_enf_pro,enfermedad_profesional.reubicacion_enf_pro FROM enfermedad_profesional,historia_clinica WHERE enfermedad_profesional.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and enfermedad_profesional.his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult4); $i++) 

{

	$eprofe= mysql_result($myresult4, $i, 0);
	$fep= mysql_result($myresult4, $i, 1);
	$eep= mysql_result($myresult4, $i, 2);
	$dep= mysql_result($myresult4, $i, 3);
	$iep= mysql_result($myresult4, $i, 4);
	$rep= mysql_result($myresult4, $i, 5);
}
$myresult5=mysql_query("SELECT antecedentes_familiares.hta, antecedentes_familiares.phta,antecedentes_familiares.infarto,antecedentes_familiares.pinfarto,antecedentes_familiares.acv,antecedentes_familiares.pacv,antecedentes_familiares.diabetes,antecedentes_familiares.pdiabetes,antecedentes_familiares.asma,antecedentes_familiares.pasma,antecedentes_familiares.tbc,antecedentes_familiares.ptbc,antecedentes_familiares.artritis,antecedentes_familiares.partritis,antecedentes_familiares.enf_mental,antecedentes_familiares.penf_mental,antecedentes_familiares.cancer,antecedentes_familiares.pcancer,antecedentes_familiares.tiroides,antecedentes_familiares.ptiroides,antecedentes_familiares.otros,antecedentes_familiares.potros FROM antecedentes_familiares, historia_clinica WHERE antecedentes_familiares.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and antecedentes_familiares.his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult5); $i++) 

{

	$hta_f= mysql_result($myresult5, $i, 0);
	$phta= mysql_result($myresult5, $i, 1);
	$infarto= mysql_result($myresult5, $i, 2);
	$pinfarto= mysql_result($myresult5, $i, 3);
	$acv= mysql_result($myresult5, $i, 4);
	$pacv= mysql_result($myresult5, $i, 5);
	$diabetes= mysql_result($myresult5, $i, 6);
	$pdiabetes= mysql_result($myresult5, $i, 7);
	$asma= mysql_result($myresult5, $i, 8);
	$pasma= mysql_result($myresult5, $i, 9);
	$tbc_f= mysql_result($myresult5, $i, 10);
	$ptbc_f= mysql_result($myresult5, $i, 11);
	$art_f= mysql_result($myresult5, $i, 12);
	$part= mysql_result($myresult5, $i, 13);		
	$em_f= mysql_result($myresult5, $i, 14);
	$pem= mysql_result($myresult5, $i, 15);
	$can= mysql_result($myresult5, $i, 16);
	$pcan= mysql_result($myresult5, $i, 17);
	$ti_f= mysql_result($myresult5, $i, 18);
	$pti_f= mysql_result($myresult5, $i, 19);
	$otros=mysql_result($myresult5, $i, 20);
	$potros=mysql_result($myresult5, $i, 21);
}
$myresult6=mysql_query("SELECT * FROM antecedentes_personales, historia_clinica WHERE antecedentes_personales.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and antecedentes_personales.his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult6); $i++) 

{

	$ce= mysql_result($myresult6, $i, 2);
	$dv= mysql_result($myresult6, $i, 3);
	$ul= mysql_result($myresult6, $i, 4);
	$so= mysql_result($myresult6, $i, 5);
	$ot= mysql_result($myresult6, $i, 6);
	$si= mysql_result($myresult6, $i, 7);
	$ri= mysql_result($myresult6, $i, 8);
	$co= mysql_result($myresult6, $i, 9);
	$hta= mysql_result($myresult6, $i, 10);
	$ec= mysql_result($myresult6, $i, 11);
	$he= mysql_result($myresult6, $i, 12);
	$ti= mysql_result($myresult6, $i, 13);
	$hi= mysql_result($myresult6, $i, 14);
	$di= mysql_result($myresult6, $i, 15);
	$ep= mysql_result($myresult6, $i, 16);
	$tbc= mysql_result($myresult6, $i, 17);
	$eap= mysql_result($myresult6, $i, 18);
	$sii= mysql_result($myresult6, $i, 19);
	$em= mysql_result($myresult6, $i, 20);
	$su= mysql_result($myresult6, $i, 21);
	$ca= mysql_result($myresult6, $i, 22);
	$her= mysql_result($myresult6, $i, 23);
	$der= mysql_result($myresult6, $i, 24);
	$art= mysql_result($myresult6, $i, 25);
	$lu= mysql_result($myresult6, $i, 26);
	$tu= mysql_result($myresult6, $i, 27);
	$va= mysql_result($myresult6, $i, 28);
	$tro= mysql_result($myresult6, $i, 29);
	$go= mysql_result($myresult6, $i, 30);
	$ale= mysql_result($myresult6, $i, 31);
	$des= mysql_result($myresult6, $i, 32);
}
$myresult7=mysql_query("SELECT * FROM antecedentes_quirurgicos_traumaticos WHERE his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult7); $i++) 

{

	$aqt= mysql_result($myresult7, $i, 2);
	$fqt= mysql_result($myresult7, $i, 3);
	$aqt2= mysql_result($myresult7, $i, 4);
	$fqt2= mysql_result($myresult7, $i, 5);
	$aqt3= mysql_result($myresult7, $i, 6);
	$fqt3= mysql_result($myresult7, $i, 7);
	$aqt4= mysql_result($myresult7, $i, 8);
	$fqt4= mysql_result($myresult7, $i, 9);
}
$myresult8=mysql_query("SELECT * FROM inmunizacion WHERE his_cod_historia_clinica=$cod_his", $link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult8); $i++) 

{

	$hepat= mysql_result($myresult8, $i, 2);
	$f_hepat= mysql_result($myresult8, $i, 3);
	$d_hepat= mysql_result($myresult8, $i, 4);
	$fa= mysql_result($myresult8, $i, 5);
	$ffa= mysql_result($myresult8, $i, 6);
	$dfa= mysql_result($myresult8, $i, 7);
	$carnet= mysql_result($myresult8, $i, 8);
	$tetano= mysql_result($myresult8, $i, 9);
	$ftetano= mysql_result($myresult8, $i, 10);
	$dtetano= mysql_result($myresult8, $i, 11);
	$inf= mysql_result($myresult8, $i, 12);
	$finf= mysql_result($myresult8, $i, 13);
	$dinf= mysql_result($myresult8, $i, 14);
	$otr= mysql_result($myresult8, $i, 15);
}
$myresult9=mysql_query("SELECT * FROM gineco_obs WHERE his_cod_historia_clinica=$cod_his",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult9); $i++) 

{

	$pg= mysql_result($myresult9, $i, 2);
	$pp= mysql_result($myresult9, $i, 3);
	$pa= mysql_result($myresult9, $i, 4);
	$pc= mysql_result($myresult9, $i, 5);
	$pe= mysql_result($myresult9, $i, 6);
	$pm= mysql_result($myresult9, $i, 7);
	$pv= mysql_result($myresult9, $i, 8);
	$mena= mysql_result($myresult9, $i, 9);
	$ciclos= mysql_result($myresult9, $i, 10);
	$fum= mysql_result($myresult9, $i, 11);
	$fup= mysql_result($myresult9, $i, 12);
	$pla= mysql_result($myresult9, $i, 13);
	$mpla= mysql_result($myresult9, $i, 14);
	$cito= mysql_result($myresult9, $i, 15);
	$fecha_cito= mysql_result($myresult9, $i, 16);
	$resu= mysql_result($myresult9, $i, 17);
	
}
$myresult10=mysql_query("SELECT * FROM habitos_toxicos WHERE his_cod_historia_clinica=$cod_his",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult10); $i++) 

{

	$fuma= mysql_result($myresult10, $i, 2);
	$ccig= mysql_result($myresult10, $i, 3);
	$exf= mysql_result($myresult10, $i, 4);
	$tf= mysql_result($myresult10, $i, 5);
	$ba= mysql_result($myresult10, $i, 6);
	$fb= mysql_result($myresult10, $i, 7);
}
$myresult11=mysql_query("SELECT * FROM signos_vitales WHERE his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult11); $i++) 

{

	$rh= mysql_result($myresult11, $i, 2);
	$temp= mysql_result($myresult11, $i, 3);
	$dies =mysql_result($myresult11, $i, 4);
	$ambi =mysql_result($myresult11, $i, 5);
	$zur =mysql_result($myresult11, $i, 6);
	$talla =mysql_result($myresult11, $i, 7);
	$peso =mysql_result($myresult11, $i, 8);
	$fr= mysql_result($myresult11, $i, 9);
	$tasv =mysql_result($myresult11, $i, 10);
	$fc =mysql_result($myresult11, $i, 11);
	$imc= mysql_result($myresult11, $i, 12);
}
$myresult12= mysql_query("SELECT p_nom_cliente FROM cliente WHERE ced_cliente=$cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult12); $i++) 

{

	$nom = mysql_result($myresult12, $i, 0);
}

if($nom==null){
$alert2="No se encontro usuario, ingreselo primero. ";
}
else if($at ==null && $nom!=null)
{
$alert="Este usuario aun no cuenta con diagnostico de enfermeria";

}
/*----------------------------------------DOCTOR----------------------------------*/
//////////// consulta ///////////////

$sql = mysql_query("SELECT historia_clinica.cod_historia_clinica FROM historia_clinica,cliente WHERE historia_clinica.cod_historia_clinica= 		  cliente.historia_clinica_cod_historia_clinica and cliente.ced_cliente = $cedula", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{
	$cod_his= mysql_result($sql, $i, 0);
}
///////////////////////////// consulta factor	seguridad /////////////7
$sql = mysql_query("SELECT * FROM `HSEQ`.`factor_seguridad` WHERE factor_seguridad.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{

$electricos1= mysql_result($sql, $i, 2);
$electricos2= mysql_result($sql, $i, 3);
$electricos3= mysql_result($sql, $i, 4);

$incendio1= mysql_result($sql, $i, 5);
$incendio2= mysql_result($sql, $i, 6);
$incendio3= mysql_result($sql, $i, 7);

$explosion1= mysql_result($sql, $i, 8);
$explosion2= mysql_result($sql, $i, 9);
$explosion3= mysql_result($sql, $i, 10);

$mecanicos1= mysql_result($sql, $i, 11);
$mecanicos2= mysql_result($sql, $i, 12);
$mecanicos3= mysql_result($sql, $i, 13);

$locativos1= mysql_result($sql, $i, 14);
$locativos2= mysql_result($sql, $i, 15);
$locativos3= mysql_result($sql, $i, 16);

$desplazamiento1= mysql_result($sql, $i, 17);
$desplazamiento2= mysql_result($sql, $i, 18);
$desplazamiento3= mysql_result($sql, $i, 19);

$orden1= mysql_result($sql, $i, 20);
$orden2= mysql_result($sql, $i, 21);
$orden3= mysql_result($sql, $i, 22);

$fenomenos1= mysql_result($sql, $i, 23);
$fenomenos2= mysql_result($sql, $i, 24);
$fenomenos3= mysql_result($sql, $i, 25);
}


/////////////////////////////////////////consulta psico ///////////////////////777


$sql = mysql_query("SELECT * FROM `HSEQ`.`factor_psico` WHERE factor_psico.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{
$contenido_de_la_tarea1=mysql_result($sql, $i, 2);
$contenido_de_la_tarea2=mysql_result($sql, $i, 3);
$contenido_de_la_tarea3=mysql_result($sql, $i, 4);

$organizacion_del_tiempo1=mysql_result($sql, $i, 5);
$organizacion_del_tiempo2=mysql_result($sql, $i, 6);
$organizacion_del_tiempo3=mysql_result($sql, $i, 7);

$relaciones_humanas1=mysql_result($sql, $i, 8);
$relaciones_humanas2=mysql_result($sql, $i, 9);
$relaciones_humanas3=mysql_result($sql, $i, 10);

$gestion1=mysql_result($sql, $i, 11);
$gestion2=mysql_result($sql, $i, 12);
$gestion3=mysql_result($sql, $i, 13);
$ambiente_fisico_de_trabajo1=mysql_result($sql, $i, 14);
$ambiente_fisico_de_trabajo2=mysql_result($sql, $i, 15);
$ambiente_fisico_de_trabajo3=mysql_result($sql, $i, 16);

}


////consulta biologico/////////////////////
$sql = mysql_query("SELECT * FROM `HSEQ`.`factor_biologico` WHERE factor_biologico.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{
$micro1=mysql_result($sql, $i, 2);
$micro2=mysql_result($sql, $i, 3);
$micro3=mysql_result($sql, $i, 4);

$ani1=mysql_result($sql, $i, 5);
$ani2=mysql_result($sql, $i, 6);
$ani3=mysql_result($sql, $i, 7);

$veg1=mysql_result($sql, $i, 8);
$veg2=mysql_result($sql, $i, 9);
$veg3=mysql_result($sql, $i, 10);

}


////consulta ergonomico/////////////////////


$sql = mysql_query("SELECT * FROM `HSEQ`.`factor_ergonomico` WHERE factor_ergonomico.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{
$carga_dinamica1=mysql_result($sql, $i, 2);
$carga_dinamica2=mysql_result($sql, $i, 3);
$carga_dinamica3=mysql_result($sql, $i, 4);

$carga_estatica1=mysql_result($sql, $i, 5);
$carga_estatica2=mysql_result($sql, $i, 6);
$carga_estatica3=mysql_result($sql, $i, 7);

$disenio_de_puestos1=mysql_result($sql, $i, 8);
$disenio_de_puestos2=mysql_result($sql, $i, 9);
$disenio_de_puestos3=mysql_result($sql, $i, 10);

$manejo_de_cargas1=mysql_result($sql, $i, 11);
$manejo_de_cargas2=mysql_result($sql, $i, 12);
$manejo_de_cargas3=mysql_result($sql, $i, 13);

$movimientos_repetitivos1=mysql_result($sql, $i, 14);
$movimientos_repetitivos2=mysql_result($sql, $i, 15);
$movimientos_repetitivos3=mysql_result($sql, $i, 16);

$videoterminales1=mysql_result($sql, $i, 17);
$videoterminales2=mysql_result($sql, $i, 18);
$videoterminales3=mysql_result($sql, $i, 19);





}


////////////////////////// consulta quimico ////////////////////////////////////////7

$sql = mysql_query("SELECT * FROM `HSEQ`.`factor_quimico` WHERE factor_quimico.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{
$gases1=mysql_result($sql, $i, 2);
$gases2=mysql_result($sql, $i, 3);
$gases3=mysql_result($sql, $i, 4);

$humos1=mysql_result($sql, $i, 5);
$humos2=mysql_result($sql, $i, 6);
$humos3=mysql_result($sql, $i, 7);

$polvos1=mysql_result($sql, $i, 8);
$polvos2=mysql_result($sql, $i, 9);
$polvos3=mysql_result($sql, $i, 10);

$liquidos1=mysql_result($sql, $i, 11);
$liquidos2=mysql_result($sql, $i, 12);
$liquidos3=mysql_result($sql, $i, 13);

$vapores1=mysql_result($sql, $i, 14);
$vapores2=mysql_result($sql, $i, 15);
$vapores3=mysql_result($sql, $i, 16);

$fibras1=mysql_result($sql, $i, 17);
$fibras2=mysql_result($sql, $i, 18);
$fibras3=mysql_result($sql, $i, 19);
}

/////////////////consulta fisico ////////////////////////////////
$sql = mysql_query("SELECT * FROM `HSEQ`.`factor_fisico` WHERE factor_fisico.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{

$iluminacion1=mysql_result($sql, $i, 2);
$iluminacion2=mysql_result($sql, $i, 3);
$iluminacion3=mysql_result($sql, $i, 4);
$radiaciones_ionizantes1=mysql_result($sql, $i, 5);
$radiaciones_ionizantes2=mysql_result($sql, $i, 6);
$radiaciones_ionizantes3=mysql_result($sql, $i, 7);

$radiaciones_no_ionizantes1=mysql_result($sql, $i, 8);
$radiaciones_no_ionizantes2=mysql_result($sql, $i, 9);
$radiaciones_no_ionizantes3=mysql_result($sql, $i, 10);

$ruido1=mysql_result($sql, $i, 11);
$ruido2=mysql_result($sql, $i, 12);
$ruido3=mysql_result($sql, $i, 13);

$temperatura_alta1=mysql_result($sql, $i, 14);
$temperatura_alta2=mysql_result($sql, $i, 15);
$temperatura_alta3=mysql_result($sql, $i, 16);

$temperatura_baja1=mysql_result($sql, $i, 17);
$temperatura_baja2=mysql_result($sql, $i, 18);
$temperatura_baja3=mysql_result($sql, $i, 19);

$vibraciones1=mysql_result($sql, $i, 20);
$vibraciones2=mysql_result($sql, $i, 21);
$vibraciones3=mysql_result($sql, $i, 22);

$barometrica1=mysql_result($sql, $i, 23);
$barometrica2=mysql_result($sql, $i, 24);
$barometrica3=mysql_result($sql, $i, 25);
$inf_examen_fisico=mysql_result($sql, $i, 26);
}
////////////////////// revision sistemaaa ///////////////////////////////7




$sql = mysql_query("SELECT * FROM `HSEQ`.`revision_sistemas` WHERE revision_sistemas.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{
$texto1=mysql_result($sql, $i, 2);
$texto2=mysql_result($sql, $i, 3);
$texto3=mysql_result($sql, $i, 4);
$texto4=mysql_result($sql, $i, 5);
$texto5=mysql_result($sql, $i, 6);
$texto6=mysql_result($sql, $i, 7);
$texto7=mysql_result($sql, $i, 8);
$texto8=mysql_result($sql, $i, 9);
$boton1=mysql_result($sql, $i, 10);
$boton2=mysql_result($sql, $i, 11);
$boton3=mysql_result($sql, $i, 12);
$boton4=mysql_result($sql, $i, 13);
$boton5=mysql_result($sql, $i, 14);
$boton6=mysql_result($sql, $i, 15);
$boton7=mysql_result($sql, $i, 16);
$boton8=mysql_result($sql, $i, 17);
}

if($boton1 =="si"){
	$sboton1='CHECKED';}
else if($boton1=="no"){
	$nboton1='CHECKED';

}
else if($boton1==""){
	$nboton1='CHECKED';
}

if($boton2 =="si"){
	$sboton2='CHECKED';}
else if($boton2=="no"){
	$nboton2='CHECKED';
}
else if($boton2==""){
	$nboton2='CHECKED';
}

if($boton3 =="si"){
	$sboton3='CHECKED';}
else if($boton3=="no"){
	$nboton3='CHECKED';
}
else if($boton3==""){
	$nboton3='CHECKED';
}

if($boton4 =="si"){
	$sboton4='CHECKED';}
else if($boton4=="no"){
	$nboton4='CHECKED';
}
else if($boton4==""){
	$nboton4='CHECKED';
}


if($boton5 =="si"){
	$sboton5='CHECKED';}
else if($boton5=="no"){
	$nboton5='CHECKED';
}
else if($boton5==""){
	$nboton5='CHECKED';
}



if($boton6 =="si"){
	$sboton6='CHECKED';}
else if($boton6=="no"){
	$nboton6='CHECKED';
}
else if($boton6==""){
	$nboton6='CHECKED';
}


if($boton7 =="si"){
	$sboton7='CHECKED';}
else if($boton7=="no"){
	$nboton7='CHECKED';
}
else if($boton7==""){
	$nboton7='CHECKED';
}

if($boton8 =="si"){
	$sboton8='CHECKED';}
else if($boton8=="no"){
	$nboton8='CHECKED';
}
else if($boton8==""){
	$nboton8='CHECKED';
}

///////////////////////////////////////77

if($eprofe =="si"){
					$s_eprofe='CHECKED';}
				else if($eprofe=="no"){
					$n_eprofe='CHECKED';
				}

//////////////////////////////////////////////Examen fisico///////////////////////////////////





$sql = mysql_query("SELECT * FROM `HSEQ`.`examen_fisico` WHERE examen_fisico.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{


$casilla1=mysql_result($sql, $i, 2);
$casilla2=mysql_result($sql, $i, 3);
$casilla3=mysql_result($sql, $i, 4);
$casilla4=mysql_result($sql, $i, 5);
$casilla5=mysql_result($sql, $i, 6);
$casilla6=mysql_result($sql, $i, 7);
$casilla7=mysql_result($sql, $i, 8);
$casilla8=mysql_result($sql, $i, 9);
$casilla9=mysql_result($sql, $i, 10);
$casilla10=mysql_result($sql, $i, 11);
$casilla11=mysql_result($sql, $i, 12);
$casilla12=mysql_result($sql, $i, 13);
$casilla13=mysql_result($sql, $i, 14);
$casilla14=mysql_result($sql, $i, 15);
$casilla15=mysql_result($sql, $i, 16);
$casilla16=mysql_result($sql, $i, 17);
$casilla17=mysql_result($sql, $i, 18);
$casilla18=mysql_result($sql, $i, 19);
$casilla19=mysql_result($sql, $i, 20);
$casilla20=mysql_result($sql, $i, 21);
$casilla21=mysql_result($sql, $i, 22);
$casilla22=mysql_result($sql, $i, 23);
$casilla23=mysql_result($sql, $i, 24);
$casilla24=mysql_result($sql, $i, 25);
$inf_examen_fisico=mysql_result($sql, $i, 26);

}






if($casilla1 =="n"){
	$ncasilla1='CHECKED';}
else if($casilla1=="an"){
	$ancasilla1='CHECKED';
}

if($casilla2 =="n"){
	$ncasilla2='CHECKED';}
else if($casilla2=="an"){
	$ancasilla2='CHECKED';
}
if($casilla3 =="n"){
	$ncasilla3='CHECKED';}
else if($casilla3=="an"){
	$ancasilla3='CHECKED';
}
if($casilla4 =="n"){
	$ncasilla4='CHECKED';}
else if($casilla4=="an"){
	$ancasilla4='CHECKED';
}
if($casilla5 =="n"){
	$ncasilla5='CHECKED';}
else if($casilla5=="an"){
	$ancasilla5='CHECKED';
}
if($casilla6 =="n"){
	$ncasilla6='CHECKED';}
else if($casilla6=="an"){
	$ancasilla6='CHECKED';
}
if($casilla7 =="n"){
	$ncasilla7='CHECKED';}
else if($casilla7=="an"){
	$ancasilla7='CHECKED';
}
if($casilla8 =="n"){
	$ncasilla8='CHECKED';}
else if($casilla8=="an"){
	$ancasilla8='CHECKED';
}
if($casilla9 =="n"){
	$ncasilla9='CHECKED';}
else if($casilla9=="an"){
	$ancasilla9='CHECKED';
}
if($casilla10 =="n"){
	$ncasilla10='CHECKED';}
else if($casilla10=="an"){
	$ancasilla10='CHECKED';
}
if($casilla11 =="n"){
	$ncasilla11='CHECKED';}
else if($casilla11=="an"){
	$ancasilla11='CHECKED';
}
if($casilla12 =="n"){
	$ncasilla12='CHECKED';}
else if($casilla12=="an"){
	$ancasilla12='CHECKED';
}
if($casilla13 =="n"){
	$ncasilla13='CHECKED';}
else if($casilla13=="an"){
	$ancasilla13='CHECKED';
}
if($casilla14 =="n"){
	$ncasilla14='CHECKED';}
else if($casilla14=="an"){
	$ancasilla14='CHECKED';
}
if($casilla15 =="n"){
	$ncasilla15='CHECKED';}
else if($casilla15=="an"){
	$ancasilla15='CHECKED';
}
if($casilla16 =="n"){
	$ncasilla16='CHECKED';}
else if($casilla16=="an"){
	$ancasilla16='CHECKED';
}
if($casilla17 =="n"){
	$ncasilla17='CHECKED';}
else if($casilla16=="an"){
	$ancasilla17='CHECKED';
}
if($casilla18 =="n"){
	$ncasilla18='CHECKED';}
else if($casilla18=="an"){
	$ancasilla18='CHECKED';
}
if($casilla19 =="n"){
	$ncasilla19='CHECKED';}
else if($casilla19=="an"){
	$ancasilla19='CHECKED';
}
if($casilla20 =="n"){
	$ncasilla20='CHECKED';}
else if($casilla20=="an"){
	$ancasilla20='CHECKED';
}
if($casilla20 =="n"){
	$ncasilla21='CHECKED';}
else if($casilla21=="an"){
	$ancasilla21='CHECKED';
}
if($casilla22 =="n"){
	$ncasilla22='CHECKED';}
else if($casilla22=="an"){
	$ancasilla22='CHECKED';
}
if($casilla23 =="n"){
	$ncasilla23='CHECKED';}
else if($casilla23=="an"){
	$ancasilla23='CHECKED';
}
if($casilla24 =="n"){
	$ncasilla24='CHECKED';}
else if($casilla24=="an"){
	$ancasilla24='CHECKED';
}
if($casilla25 =="n"){
	$ncasilla25='CHECKED';}
else if($casilla25=="an"){
	$ancasilla25='CHECKED';
}

//////////////////////////////////////////////////////////////////////////////////////////////


$sql = mysql_query("SELECT * FROM `HSEQ`.`concepto` WHERE concepto.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{


$apto_sin_lim=mysql_result($sql, $i, 2);
$apto_con_lim=mysql_result($sql, $i, 3);
$apto_para_manipulacion=mysql_result($sql, $i, 4);
$al_examen=mysql_result($sql, $i, 5);
$apto_trabajo_alturas=mysql_result($sql, $i, 6);
$aplazado=mysql_result($sql, $i, 7);
$observaciones=mysql_result($sql, $i, 8);
$recos=mysql_result($sql, $i, 9);
$aplazada_final=mysql_result($sql, $i, 10);


}







         
if($apto_sin_lim =="si"){
	$Sapto_sin_lim='CHECKED';}
if($apto_con_lim=="si"){
	$Sapto_con_lim='CHECKED';}

if($apto_para_manipulacion=="si"){
	$Sapto_para_manipulacion='CHECKED';}

if($al_examen=="si"){
	$Sal_examen='CHECKED';}
if($apto_trabajo_alturas=="si"){
	$Sapto_trabajo_alturas='CHECKED';}

if($aplazada_final=="si"){
	$Saplazada_final='CHECKED';}

//////////////////////////////////////////////////////////////////////////////////////////////////////
$sql = mysql_query("SELECT * FROM `HSEQ`.`concepto` WHERE concepto.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{

$apto_sin_lim=mysql_result($sql, $i, 2);
$apto_con_lim=mysql_result($sql, $i, 3);
$apto_para_manipulacion=mysql_result($sql, $i, 4);
$al_examen=mysql_result($sql, $i, 5);
$apto_trabajo_alturas=mysql_result($sql, $i, 6);
$aplazado=mysql_result($sql, $i, 7);
$observaciones=mysql_result($sql, $i, 8);
$reo=mysql_result($sql, $i, 9);
}






//////////////////////////////////////////////////////////////////////////////////////////////////


$sql = mysql_query("SELECT * FROM `HSEQ`.`examen_fisico` WHERE examen_fisico.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{


$casilla1=mysql_result($sql, $i, 2);
$casilla2=mysql_result($sql, $i, 3);
$casilla3=mysql_result($sql, $i, 4);
$casilla4=mysql_result($sql, $i, 5);
$casilla5=mysql_result($sql, $i, 6);
$casilla6=mysql_result($sql, $i, 7);
$casilla7=mysql_result($sql, $i, 8);
$casilla8=mysql_result($sql, $i, 9);
$casilla9=mysql_result($sql, $i, 10);
$casilla10=mysql_result($sql, $i, 11);
$casilla11=mysql_result($sql, $i, 12);
$casilla12=mysql_result($sql, $i, 13);
$casilla13=mysql_result($sql, $i, 14);
$casilla14=mysql_result($sql, $i, 15);
$casilla15=mysql_result($sql, $i, 16);
$casilla16=mysql_result($sql, $i, 17);
$casilla17=mysql_result($sql, $i, 18);
$casilla18=mysql_result($sql, $i, 19);
$casilla19=mysql_result($sql, $i, 20);
$casilla20=mysql_result($sql, $i, 21);
$casilla21=mysql_result($sql, $i, 22);
$casilla22=mysql_result($sql, $i, 23);
$casilla23=mysql_result($sql, $i, 24);
$casilla24=mysql_result($sql, $i, 25);
$inf_examen_fisico=mysql_result($sql, $i, 26);

}
if($casilla1 =="n"){
	$ncasilla1='CHECKED';}
else if($casilla1=="an"){
	$ancasilla1='CHECKED';
}
if($casilla2 =="n"){
	$ncasilla2='CHECKED';}
else if($casilla2=="an"){
	$ancasilla2='CHECKED';
}
if($casilla3 =="n"){
	$ncasilla3='CHECKED';}
else if($casilla3=="an"){
	$ancasilla3='CHECKED';
}
if($casilla4 =="n"){
	$ncasilla4='CHECKED';}
else if($casilla4=="an"){
	$ancasilla4='CHECKED';
}
if($casilla5 =="n"){
	$ncasilla5='CHECKED';}
else if($casilla5=="an"){
	$ancasilla5='CHECKED';
}
if($casilla6 =="n"){
	$ncasilla6='CHECKED';}
else if($casilla6=="an"){
	$ancasilla6='CHECKED';
}
if($casilla7 =="n"){
	$ncasilla7='CHECKED';}
else if($casilla7=="an"){
	$ancasilla7='CHECKED';
}
if($casilla8 =="n"){
	$ncasilla8='CHECKED';}
else if($casilla8=="an"){
	$ancasilla8='CHECKED';
}
if($casilla9 =="n"){
	$ncasilla9='CHECKED';}
else if($casilla9=="an"){
	$ancasilla9='CHECKED';
}
if($casilla10 =="n"){
	$ncasilla10='CHECKED';}
else if($casilla10=="an"){
	$ancasilla10='CHECKED';
}
if($casilla11 =="n"){
	$ncasilla11='CHECKED';}
else if($casilla11=="n"){
	$ancasilla11='CHECKED';
}
if($casilla12 =="n"){
	$ncasilla12='CHECKED';}
else if($casilla12=="an"){
	$ancasilla12='CHECKED';
}
if($casilla13 =="n"){
	$ncasilla13='CHECKED';}
else if($casilla13=="n"){
	$ancasilla13='CHECKED';
}
if($casilla14 =="n"){
	$ncasilla14='CHECKED';}
else if($casilla14=="n"){
	$ancasilla14='CHECKED';
}
if($casilla15 =="n"){
	$ncasilla15='CHECKED';}
else if($casilla15=="an"){
	$ancasilla15='CHECKED';
}
if($casilla16 =="n"){
	$ncasilla16='CHECKED';}
else if($casilla16=="an"){
	$ancasilla16='CHECKED';
}
if($casilla17 =="n"){
	$ncasilla17='CHECKED';}
else if($casilla16=="an"){
	$ancasilla17='CHECKED';
}
if($casilla18 =="n"){
	$ncasilla18='CHECKED';}
else if($casilla18=="an"){
	$ancasilla18='CHECKED';
}
if($casilla19 =="n"){
	$ncasilla19='CHECKED';}
else if($casilla19=="an"){
	$ancasilla19='CHECKED';
}
if($casilla20 =="n"){
	$ncasilla20='CHECKED';}
else if($casilla20=="an"){
		$ancasilla20='CHECKED';
}
if($casilla20 =="n"){
	$ncasilla21='CHECKED';}
else if($casilla21=="an"){
	$ancasilla21='CHECKED';
}
if($casilla22 =="n"){
	$ncasilla22='CHECKED';}
else if($casilla22=="n"){
	$ancasilla22='CHECKED';
}
if($casilla23 =="n"){
	$ncasilla23='CHECKED';}
else if($casilla23=="an"){
	$ancasilla23='CHECKED';
}
if($casilla24 =="n"){
	$ncasilla24='CHECKED';}
else if($casilla24=="an"){
	$ancasilla24='CHECKED';
}
if($casilla25 =="n"){
	$ncasilla25='CHECKED';}
else if($casilla25=="an"){
	$ancasilla25='CHECKED';
}

//////////////////////////////////////////////////////////////////////////////////////////////77
/*-----------------------------------VISIOMETRIA------------------------------------*/


$myresult = mysql_query("SELECT cliente.p_nom_cliente,visiometria.id_vis,visiometria.his_cod_historia_clinica,visiometria.od_cerca_cc,visiometria.od_cerca_sc,visiometria.oi_cerca_cc,visiometria.oi_cerca_sc,visiometria.od_lejos_cc,visiometria.od_lejos_sc,visiometria.oi_lejos_cc,visiometria.oi_lejos_sc,visiometria.hallazgos,visiometria.diag_visi  FROM cliente INNER JOIN (historia_clinica INNER JOIN visiometria ON visiometria.his_cod_historia_clinica = historia_clinica.cod_historia_clinica) ON historia_clinica.cod_historia_clinica = cliente.historia_clinica_cod_historia_clinica WHERE cliente.ced_cliente = $cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult); $i++) 

{

	$id_vi = mysql_result($myresult, $i, 1);
	$cod_his = mysql_result($myresult, $i, 2);
	$od_c_c = mysql_result($myresult, $i, 3);
	$od_c_s = mysql_result($myresult, $i, 4);
	$od_l_c = mysql_result($myresult, $i, 5);
	$oi_c_s = mysql_result($myresult, $i, 6);
	$oi_c_c = mysql_result($myresult, $i, 7);
	$od_l_s = mysql_result($myresult, $i, 8);
	$oi_l_c = mysql_result($myresult, $i, 9);
	$oi_l_s = mysql_result($myresult, $i, 10);
	$hall_visi = mysql_result($myresult, $i, 11);
	$diag_visi = mysql_result($myresult, $i, 12);
}

//echo $hall_visi;
$myresult2= mysql_query("SELECT p_nom_cliente FROM cliente WHERE ced_cliente=$cedula;",Conectarse())or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult2); $i++) 

{

	$nom = mysql_result($myresult2, $i, 0);
}

if($nom==null){
$alert2="No se encontro usuario, ingreselo primero. ";
}
else if($id_vi ==null && $nom!=null)
{
$alert="Este usuario aun no cuenta con examen de visiometria";

}

/*-------------------------------------------paciente-------------------------------*/
$sql = mysql_query("SELECT * FROM cliente WHERE ced_cliente = $cedula", $link) or die(mysql_error());
		   $sql2 = mysql_query("SELECT historia_clinica.motivo_evaluacion, historia_clinica.fecha_historia_clinica FROM historia_clinica,cliente WHERE historia_clinica.cod_historia_clinica= cliente.historia_clinica_cod_historia_clinica and cliente.ced_cliente=$cedula", $link) or die(mysql_error());
		   $sql3= mysql_query("SELECT empresa_usuaria.nom_empresa_usuaria FROM cliente INNER JOIN (empresa_usuaria INNER JOIN departamento ON departamento.empresa_usuaria_id_empresa_usuaria = empresa_usuaria.id_empresa_usuaria) ON departamento.id_departamento = cliente.departamento_id_departamento WHERE cliente.ced_cliente = $cedula",$link)or die(mysql_error());
		   $sql4 = mysql_query("SELECT empresa_cliente.nom_empresa_cliente FROM empresa_cliente,cliente WHERE cliente.empresa_cliente_id_empresa_cliente = empresa_cliente.id_empresa_cliente and ced_cliente = $cedula", $link) or die(mysql_error());
		   $sql5 = mysql_query("SELECT departamento.nom_departamento FROM departamento,cliente WHERE cliente.departamento_id_departamento=departamento.id_departamento and ced_cliente = $cedula", $link) or die(mysql_error());

                   for ($i = 0; $i < mysql_numrows($sql); $i++) 

			{

			$cedula1= mysql_result($sql, $i, 0);
			$p_nom= mysql_result($sql, $i, 4);

			$s_nom= mysql_result($sql, $i, 5);
			$p_ape= mysql_result($sql, $i, 6);
			$s_ape= mysql_result($sql, $i, 7);
			$gen= mysql_result($sql, $i, 8);
			$edad= mysql_result($sql, $i, 9);
			$f_nac= mysql_result($sql, $i, 10);
			$dir= mysql_result($sql, $i, 11);
			$tel= mysql_result($sql, $i, 12);
			$est_civ= mysql_result($sql, $i, 13);
			$esc= mysql_result($sql, $i, 14);
			$pro= mysql_result($sql, $i, 15);
			$car= mysql_result($sql, $i, 16);
			$f_ing= mysql_result($sql, $i, 17);
			$j_tra= mysql_result($sql, $i, 18);
			$lu_nac= mysql_result($sql, $i, 19);
			$fecha_ingreso= mysql_result($sql, $i, 23);
			
			}
for ($i = 0; $i < mysql_numrows($sql2); $i++) 

			{

			$mot= mysql_result($sql2, $i, 0);
			$f_his= mysql_result($sql2, $i, 1);
			}
for ($i = 0; $i < mysql_numrows($sql3); $i++) 

			{

			$e_usu= mysql_result($sql3, $i, 0);
			}
for ($i = 0; $i < mysql_numrows($sql4); $i++) 

			{

			$emp_cli= mysql_result($sql4, $i, 0);
			}
for ($i = 0; $i < mysql_numrows($sql5); $i++) 

			{

			$dep= mysql_result($sql5, $i, 0);
			}




}


/////////////////////////////accidentes de trabajo//////////////////////////////////////////////////////77
$myresult3=mysql_query("SELECT accidentes_trabajo.id_acc_trab,accidentes_trabajo.acc_trab,accidentes_trabajo.fecha_acc_trab,accidentes_trabajo.empresa_acc_trab,accidentes_trabajo.causa_acc_trab,accidentes_trabajo.tipo_acc_trab,accidentes_trabajo.parte_acc_trab,accidentes_trabajo.inc_acc_trab,accidentes_trabajo.secuelas_acc_trab,accidentes_trabajo.his_cod_historia_clinica FROM accidentes_trabajo, historia_clinica WHERE accidentes_trabajo.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and accidentes_trabajo.his_cod_historia_clinica=$cod_his",$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult3); $i++) 
{
	$id_acc_trabajo= mysql_result($myresult3, $i, 0);	
	$at= mysql_result($myresult3, $i, 1);
	$fat= mysql_result($myresult3, $i, 2);
	$eat= mysql_result($myresult3, $i, 3);
	$cat= mysql_result($myresult3, $i, 4);
	$tat= mysql_result($myresult3, $i, 5);
	$pat= mysql_result($myresult3, $i, 6);
	$iat= mysql_result($myresult3, $i, 7);
	$sat= mysql_result($myresult3, $i, 8);
	$id_hist_acc_traba= mysql_result($myresult3, $i, 9);
	}


if($fat!=null ){
$id_acc_trabajo=$id_acc_trabajo-1;

$myresult3a=mysql_query("SELECT accidentes_trabajo.id_acc_trab,accidentes_trabajo.acc_trab,accidentes_trabajo.fecha_acc_trab,accidentes_trabajo.empresa_acc_trab,accidentes_trabajo.causa_acc_trab,accidentes_trabajo.tipo_acc_trab,accidentes_trabajo.parte_acc_trab,accidentes_trabajo.inc_acc_trab,accidentes_trabajo.secuelas_acc_trab,accidentes_trabajo.his_cod_historia_clinica FROM accidentes_trabajo, historia_clinica WHERE accidentes_trabajo.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and accidentes_trabajo.his_cod_historia_clinica=$id_hist_acc_traba and accidentes_trabajo.id_acc_trab=$id_acc_trabajo" ,$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult3a); $i++) 
{
	$id_acc_trabajo1= mysql_result($myresult3a, $i, 0);	
	$at1= mysql_result($myresult3a, $i, 1);
	$fat1= mysql_result($myresult3a, $i, 2);
	$eat1= mysql_result($myresult3a, $i, 3);
	$cat1= mysql_result($myresult3a, $i, 4);
	$tat1= mysql_result($myresult3a, $i, 5);
	$pat1= mysql_result($myresult3a, $i, 6);
	$iat1= mysql_result($myresult3a, $i, 7);
	$sat1= mysql_result($myresult3a, $i, 8);
	$id_hist_acc_traba1= mysql_result($myresult3a, $i, 9);
	}

$id_acc_trabajo=$id_acc_trabajo-1;

$myresult3b=mysql_query("SELECT accidentes_trabajo.id_acc_trab,accidentes_trabajo.acc_trab,accidentes_trabajo.fecha_acc_trab,accidentes_trabajo.empresa_acc_trab,accidentes_trabajo.causa_acc_trab,accidentes_trabajo.tipo_acc_trab,accidentes_trabajo.parte_acc_trab,accidentes_trabajo.inc_acc_trab,accidentes_trabajo.secuelas_acc_trab,accidentes_trabajo.his_cod_historia_clinica FROM accidentes_trabajo, historia_clinica WHERE accidentes_trabajo.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and accidentes_trabajo.his_cod_historia_clinica=$id_hist_acc_traba and accidentes_trabajo.id_acc_trab=$id_acc_trabajo" ,$link)or die(mysql_error());
for ($i = 0; $i < mysql_numrows($myresult3b); $i++) 
{
	$id_acc_trabajo2= mysql_result($myresult3b, $i, 0);	
	$at2= mysql_result($myresult3b, $i, 1);
	$fat2= mysql_result($myresult3b, $i, 2);
	$eat2= mysql_result($myresult3b, $i, 3);
	$cat2= mysql_result($myresult3b, $i, 4);
	$tat2= mysql_result($myresult3b, $i, 5);
	$pat2= mysql_result($myresult3b, $i, 6);
	$iat2= mysql_result($myresult3b, $i, 7);
	$sat2= mysql_result($myresult3b, $i, 8);
	$id_hist_acc_traba2= mysql_result($myresult3b, $i, 9);
	}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////





?>



<?php  



if($iluminacion1 =="e1"){$e1_iluminacion='CHECKED';}
if($iluminacion2 =="e2"){$e2_iluminacion='CHECKED';}
if($iluminacion3 =="e3"){$e3_iluminacion='CHECKED';}
if($radiaciones_ionizantes1 =="e1"){$e1_radiaciones_ionizantes='CHECKED';}
if($radiaciones_ionizantes2 =="e2"){$e2_radiaciones_ionizantes='CHECKED';}
if($radiaciones_ionizantes3 =="e3"){$e3_radiaciones_ionizantes='CHECKED';}
if($radiaciones_no_ionizantes1 =="e1"){$e1_radiaciones_no_ionizantes='CHECKED';}
if($radiaciones_no_ionizantes2 =="e2"){$e2_radiaciones_no_ionizantes='CHECKED';}
if($radiaciones_no_ionizantes3 =="e3"){$e3_radiaciones_no_ionizantes='CHECKED';}

if($ruido1 =="e1"){$e1_ruido='CHECKED';}
if($ruido2 =="e2"){$e2_ruido='CHECKED';}
if($ruido3 =="e3"){$e3_ruido='CHECKED';}

if($temperatura_alta1 =="e1"){$e1_temperatura_alta='CHECKED';}
if($temperatura_alta2 =="e2"){$e2_temperatura_alta='CHECKED';}
if($temperatura_alta3 =="e3"){$e3_temperatura_alta='CHECKED';}

if($temperatura_baja1 =="e1"){$e1_temperatura_baja='CHECKED';}
if($temperatura_baja2 =="e2"){$e2_temperatura_baja='CHECKED';}
if($temperatura_baja3 =="e3"){$e3_temperatura_baja='CHECKED';}

if($vibraciones1 =="e1"){$e1_vibraciones='CHECKED';}
if($vibraciones2 =="e2"){$e2_vibraciones='CHECKED';}
if($vibraciones3 =="e3"){$e3_vibraciones='CHECKED';}

if($barometrica1 =="e1"){$e1_barometrica='CHECKED';}
if($barometrica2 =="e2"){$e2_barometrica='CHECKED';}
if($barometrica3 =="e3"){$e3_barometrica='CHECKED';}




if($gases1 =="e1"){$e1_gases='CHECKED';}
if($gases2 =="e2"){$e2_gases='CHECKED';}
if($gases3 =="e3"){$e3_gases='CHECKED';}
if($humos1 =="e1"){$e1_humos='CHECKED';}
if($humos2 =="e2"){$e2_humos='CHECKED';}
if($humos3 =="e3"){$e3_humos='CHECKED';}
if($polvos1 =="e1"){$e1_polvos='CHECKED';}
if($polvos2 =="e2"){$e2_polvos='CHECKED';}
if($polvos3 =="e3"){$e3_polvos='CHECKED';}

if($liquidos1 =="e1"){$e1_liquidos='CHECKED';}
if($liquidos2 =="e2"){$e2_liquidos='CHECKED';}
if($liquidos3 =="e3"){$e3_liquidos='CHECKED';}

if($vapores1 =="e1"){$e1_vapores='CHECKED';}
if($vapores2 =="e2"){$e2_vapores='CHECKED';}
if($vapores3 =="e3"){$e3_vapores='CHECKED';}
if($fibras1 =="e1"){$e1_fibras='CHECKED';}
if($fibras2 =="e2"){$e2_fibras='CHECKED';}
if($fibras3 =="e3"){$e3_fibras='CHECKED';}




if($carga_dinamica1 =="e1"){$e1_carga_dinamica='CHECKED';}
if($carga_dinamica2 =="e2"){$e2_carga_dinamica='CHECKED';}
if($carga_dinamica3 =="e3"){$e3_carga_dinamica='CHECKED';}
if($carga_estatica1 =="e1"){$e1_carga_estatica='CHECKED';}
if($carga_estatica2 =="e2"){$e2_carga_estatica='CHECKED';}
if($carga_estatica3 =="e3"){$e3_carga_estatica='CHECKED';}
if($disenio_de_puestos1 =="e1"){$e1_disenio_de_puestos='CHECKED';}
if($disenio_de_puestos2 =="e2"){$e2_disenio_de_puestos='CHECKED';}
if($disenio_de_puestos3 =="e3"){$e3_disenio_de_puestos='CHECKED';}

if($manejo_de_cargas1 =="e1"){$e1_manejo_de_cargas='CHECKED';}
if($manejo_de_cargas2 =="e2"){$e2_manejo_de_cargas='CHECKED';}
if($manejo_de_cargas3 =="e3"){$e3_manejo_de_cargas='CHECKED';}

if($movimientos_repetitivos1 =="e1"){$e1_movimientos_repetitivos='CHECKED';}
if($movimientos_repetitivos2 =="e2"){$e2_movimientos_repetitivos='CHECKED';}
if($movimientos_repetitivos3 =="e3"){$e3_movimientos_repetitivos='CHECKED';}
if($videoterminales1 =="e1"){$e1_videoterminales='CHECKED';}
if($videoterminales2 =="e2"){$e2_videoterminales='CHECKED';}
if($videoterminales3 =="e3"){$e3_videoterminales='CHECKED';}




if($micro1 =="e1"){$e1_micro='CHECKED';}
if($micro2 =="e2"){$e2_micro='CHECKED';}
if($micro3 =="e3"){$e3_micro='CHECKED';}
if($ani1 =="e1"){$e1_ani='CHECKED';}
if($ani2 =="e2"){$e2_ani='CHECKED';}
if($ani3 =="e3"){$e3_ani='CHECKED';}
if($veg1 =="e1"){$e1_veg='CHECKED';}
if($veg2 =="e2"){$e2_veg='CHECKED';}
if($veg3 =="e3"){$e3_veg='CHECKED';}




if($contenido_de_la_tarea1 =="e1"){$e1_contenido_de_la_tarea='CHECKED';}
if($contenido_de_la_tarea2 =="e2"){$e2_contenido_de_la_tarea='CHECKED';}
if($contenido_de_la_tarea3 =="e3"){$e3_contenido_de_la_tarea='CHECKED';}
if($organizacion_del_tiempo1 =="e1"){$e1_organizacion_del_tiempo='CHECKED';}
if($organizacion_del_tiempo2 =="e2"){$e2_organizacion_del_tiempo='CHECKED';}
if($organizacion_del_tiempo3 =="e3"){$e3_organizacion_del_tiempo='CHECKED';}
if($relaciones_humanas1 =="e1"){$e1_relaciones_humanas='CHECKED';}
if($relaciones_humanas2 =="e2"){$e2_relaciones_humanas='CHECKED';}
if($relaciones_humanas3 =="e3"){$e3_relaciones_humanas='CHECKED';}
if($gestion1 =="e1"){$e1_gestion='CHECKED';}
if($gestion2 =="e2"){$e2_gestion='CHECKED';}
if($gestion3 =="e3"){$e3_gestion='CHECKED';}

if($ambiente_fisico_de_trabajo1 =="e1"){$e1_ambiente_fisico_de_trabajo='CHECKED';}
if($ambiente_fisico_de_trabajo2 =="e2"){$e2_ambiente_fisico_de_trabajo='CHECKED';}
if($ambiente_fisico_de_trabajo3 =="e3"){$e3_ambiente_fisico_de_trabajo='CHECKED';}



if($electricos1 =="e1"){$e1_electricos='CHECKED';}
if($electricos2 =="e2"){$e2_electricos='CHECKED';}
if($electricos3 =="e3"){$e3_electricos='CHECKED';}
if($incendio1 =="e1"){$e1_incendio='CHECKED';}
if($incendio2 =="e2"){$e2_incendio='CHECKED';}
if($incendio3 =="e3"){$e3_incendio='CHECKED';}
if($explosion1 =="e1"){$e1_explosion='CHECKED';}
if($explosion2 =="e2"){$e2_explosion='CHECKED';}
if($explosion3 =="e3"){$e3_explosion='CHECKED';}

if($mecanicos1 =="e1"){$e1_mecanicos='CHECKED';}
if($mecanicos2 =="e2"){$e2_mecanicos='CHECKED';}
if($mecanicos3 =="e3"){$e3_mecanicos='CHECKED';}
if($locativos1 =="e1"){$e1_locativos='CHECKED';}
if($locativos2 =="e2"){$e2_locativos='CHECKED';}
if($locativos3 =="e3"){$e3_locativos='CHECKED';}
if($desplazamiento1 =="e1"){$e1_desplazamiento='CHECKED';}
if($desplazamiento2 =="e2"){$e2_desplazamiento='CHECKED';}
if($desplazamiento3 =="e3"){$e3_desplazamiento='CHECKED';}
if($orden1 =="e1"){$e1_orden='CHECKED';}
if($orden2 =="e2"){$e2_orden='CHECKED';}
if($orden3 =="e3"){$e3_orden='CHECKED';}
if($fenomenos1 =="e1"){$e1_fenomenos='CHECKED';}
if($fenomenos2 =="e2"){$e2_fenomenos='CHECKED';}
if($fenomenos3 =="e3"){$e3_fenomenos='CHECKED';}


/////////////////////////////////////////////////////////////////////////////////////////////7

if($at =="si"){
	$sat1='CHECKED';}
else if($at=="no"){
	$nat1='CHECKED';
}

if($hta_f =="si"){
					$shta_f='CHECKED';}
				else if($hta_f=="no"){
					$nhta_f='CHECKED';
				}
else if($hta_f==""){
					$nhta_f='CHECKED';
				}
				if($infarto =="si"){
					$sinfar='CHECKED';}
				else if($infarto=="no"){
					$ninfar='CHECKED';
				}else if($infarto==""){
					$ninfar='CHECKED';
				}
				if($acv =="si"){
					$sacv='CHECKED';}
				else if($acv=="no"){
					$nacv='CHECKED';
				}
else if($acv==""){
					$nacv='CHECKED';
				}
				if($diabetes =="si"){
					$sd='CHECKED';}
				else if($diabetes=="no"){
					$nd='CHECKED';
				}else if($diabetes==""){
					$nd='CHECKED';
				}
				if($asma =="si"){
					$sas='CHECKED';}
				else if($asma=="no"){
					$nas='CHECKED';
				}
else if($asma==""){
					$nas='CHECKED';
				}
				if($tbc_f =="si"){
					$st='CHECKED';}
				else if($tbc_f=="no"){
					$nt='CHECKED';
				}
else if($tbc_f==""){
					$nt='CHECKED';
				}
				if($art_f =="si"){
					$sart_f='CHECKED';}
				else if($art_f=="no"){
					$nart_f='CHECKED';
				}
else if($art_f==""){
					$nart_f='CHECKED';
				}
				if($em_f =="si"){
					$sem_f='CHECKED';}
				else if($em_f=="no"){
					$nem_f='CHECKED';
				}
else if($em_f==""){
					$nem_f='CHECKED';
				}
				if($can =="si"){
					$scan='CHECKED';}
				else if($can=="no"){
					$ncan='CHECKED';
				}
else if($can==""){
					$ncan='CHECKED';
				}
				if($ti_f =="si"){
					$sti_f='CHECKED';}
				else if($ti_f=="no"){
					$nti_f='CHECKED';
				}
else if($ti_f==""){
					$nti_f='CHECKED';
				}
				if($otros =="si"){
					$sotros='CHECKED';}
				else if($otros=="no"){
					$notros='CHECKED';
				}
else if($otros==""){
					$notros='CHECKED';
				}




if($ce =="si"){
					$sce='CHECKED';}
	else if($ce=="no"){
					$nce='CHECKED';
				}
else if($ce==""){
					$nce='CHECKED';
				}
				if($dv =="si"){
					$sdv='CHECKED';}
				else if($dv=="no"){
					$ndv='CHECKED';
				}
else if($dv==""){
					$ndv='CHECKED';
				}
				if($ul =="si"){
					$sul='CHECKED';}
				else if($ul=="no"){
					$nul='CHECKED';
				}
else if($ul==""){
					$nul='CHECKED';
				}
				if($so =="si"){
					$sso='CHECKED';}
				else if($so=="no"){
					$nso='CHECKED';
				}
else if($so==""){
					$nso='CHECKED';
				}
				if($ot =="si"){
					$sot='CHECKED';}
				else if($ot=="no"){
					$not='CHECKED';
				}
else if($ot==""){
					$not='CHECKED';
				}
				if($si =="si"){
					$ssi='CHECKED';}
				else if($si=="no"){
					$nsi='CHECKED';
				}
else if($si==""){
					$nsi='CHECKED';
				}
				if($ri =="si"){
					$sri='CHECKED';}
				else if($ri=="no"){
					$nri='CHECKED';
				}
else if($ri==""){
					$nri='CHECKED';
				}
				if($co =="si"){
					$sco='CHECKED';}
				else if($co=="no"){
					$nco='CHECKED';
				}
else if($co==""){
					$nco='CHECKED';
				}
				if($hta =="si"){
					$shta='CHECKED';}
				else if($hta=="no"){
					$nhta='CHECKED';
				}
else if($hta==""){
					$nhta='CHECKED';
				}
				if($ec =="si"){
					$sec='CHECKED';}
				else if($ec=="no"){
					$nec='CHECKED';
				}
else if($ec==""){
					$nec='CHECKED';
				}
				if($he =="si"){
					$she='CHECKED';}
				else if($he=="no"){
					$nhe='CHECKED';
				}
else if($he==""){
					$nhe='CHECKED';
				}
				if($ti =="si"){
					$sti='CHECKED';}
				else if($ti=="no"){
					$nti='CHECKED';
				}
else if($ti==""){
					$nti='CHECKED';
				}
				if($hi=="si"){
					$shi='CHECKED';}
				else if($hi=="no"){
					$nhi='CHECKED';
				}
else if($hi==""){
					$nhi='CHECKED';
				}
				if($di =="si"){
					$sdi='CHECKED';}
				else if($di=="no"){
					$ndi='CHECKED';
				}
else if($di==""){
					$ndi='CHECKED';
				}
				if($ep =="si"){
					$sep='CHECKED';}
				else if($ep=="no"){
					$nep='CHECKED';
				}
else if($ep==""){
					$nep='CHECKED';
				}
				if($tbc =="si"){
					$stbc='CHECKED';}
				else if($tbc=="no"){
					$ntbc='CHECKED';
				}
else if($tbc==""){
					$ntbc='CHECKED';
				}
				if($eap =="si"){
					$seap='CHECKED';}
				else if($eap=="no"){
					$neap='CHECKED';
				}
else if($eap==""){
					$neap='CHECKED';
				}
				if($sii =="si"){
					$ssii='CHECKED';}
				else if($sii=="no"){
					$nsii='CHECKED';
				}
else if($sii==""){
					$nsii='CHECKED';
				}
				if($em =="si"){
					$sen_m='CHECKED';}
				else if($em=="no"){
					$nen_m='CHECKED';
				}
else if($em==""){
					$nen_m='CHECKED';
				}
				if($su =="si"){
					$ssu='CHECKED';}
				else if($su=="no"){
					$nsu='CHECKED';
				}
else if($su==""){
					$nsu='CHECKED';
				}
				if($ca =="si"){
					$sca='CHECKED';}
				else if($ca=="no"){
					$nca='CHECKED';
				}
else if($ca==""){
					$nca='CHECKED';
				}
				if($her =="si"){
					$sher='CHECKED';}
				else if($her=="no"){
					$nher='CHECKED';
				}
else if($her==""){
					$nher='CHECKED';
				}
				if($der =="si"){
					$sder='CHECKED';}
				else if($der=="no"){
					$nder='CHECKED';
				}
else if($der==""){
					$nder='CHECKED';
				}
				if($art =="si"){
					$sart='CHECKED';}
				else if($art=="no"){
					$nart='CHECKED';
				}
else if($art==""){
					$nart='CHECKED';
				}
				if($lu =="si"){
					$slu='CHECKED';}
				else if($lu=="no"){
					$nlu='CHECKED';
				}
else if($lu==""){
					$nlu='CHECKED';
				}
				if($tu =="si"){
					$stu='CHECKED';}
				else if($tu=="no"){
					$ntu='CHECKED';
				}
else if($tu==""){
					$ntu='CHECKED';
				}
				if($va =="si"){
					$sva='CHECKED';}
				else if($va=="no"){
					$nva='CHECKED';
				}
else if($va==""){
					$nva='CHECKED';
				}
				if($tro =="si"){
					$stro='CHECKED';}
				else if($tro=="no"){
					$ntro='CHECKED';
				}
else if($tro==""){
					$ntro='CHECKED';
				}
				if($go =="si"){
					$sgo='CHECKED';}
				else if($go=="no"){
					$ngo='CHECKED';
				}
else if($go==""){
					$ngo='CHECKED';
				}
				if($ale =="si"){
					$sale='CHECKED';}
				else if($ale=="no"){
					$nale='CHECKED';
				}
else if($ale==""){
					$nale='CHECKED';
				}
if($hepat =="si"){
					$shepat='CHECKED';}
				else if($hepat=="no"){
					$nhepat='CHECKED';
				}
else if($hepat==""){
					$nhepat='CHECKED';
				}
				if($fa =="si"){
					$sfa='CHECKED';}
				else if($fa=="no"){
					$nfa='CHECKED';
				}
else if($fa==""){
					$nfa='CHECKED';
				}
				if($tetano =="si"){
					$stetano='CHECKED';}
				else if($tetano=="no"){
					$ntetano='CHECKED';
				}
else if($tetano==""){
					$ntetano='CHECKED';
				}
				if($inf =="si"){
					$sinf='CHECKED';}
				else if($inf=="no"){
					$ninf='CHECKED';
				}
else if($inf==""){
					$ninf='CHECKED';
				}
				if($carnet =="si"){
					$scarnet='CHECKED';}
				else if($carnet=="no"){
					$ncarnet='CHECKED';
				}
else if($carnet==""){
					$ncarnet='CHECKED';
				}




if($pla=="si")
{
$spla='CHECKED';

}
else if($pla=="no")
{
$npla='CHECKED';
}
else if($pla=="")
{
$npla='CHECKED';
}
if($cito=="si")
{
$scito='CHECKED';
}
else if($cito=="no")
{
$ncito='CHECKED';
}
else if($cito=="")
{
$ncito='CHECKED';
}


if($fuma=="si")
{
$sfuma='CHECKED';
}
else if($fuma=="no")
{
$nfuma='CHECKED';
}
else if($fuma=="")
{
$nfuma='CHECKED';
}
if($exf=="si")
{
$sexf='CHECKED';
}
else if($exf=="no")
{
$nexf='CHECKED';
}
else if($exf=="")
{
$nexf='CHECKED';
}
if($ba=="si")
{
$sba='CHECKED';
}
else if($ba=="no")
{
$nba='CHECKED';
}
else if($ba=="")
{
$nba='CHECKED';
}



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

$sql = mysql_query("SELECT * FROM `HSEQ`.`concepto` WHERE concepto.his_cod_historia_clinica= $cod_his", $link) or die(mysql_error()); 
for ($i = 0; $i < mysql_numrows($sql); $i++) 
{


$apto_sin_lim=mysql_result($sql, $i, 2);
$apto_con_lim=mysql_result($sql, $i, 3);
$apto_para_manipulacion=mysql_result($sql, $i, 4);
$al_examen=mysql_result($sql, $i, 5);
$apto_trabajo_alturas=mysql_result($sql, $i, 6);
$aplazado=mysql_result($sql, $i, 7);
$observaciones=mysql_result($sql, $i, 8);
$recos=mysql_result($sql, $i, 9);
$aplazado_final=mysql_result($sql, $i, 10);

}







         
if($apto_sin_lim =="si"){
	$Sapto_sin_lim='CHECKED';}
if($apto_con_lim=="si"){
	$Sapto_con_lim='CHECKED';}

if($apto_para_manipulacion=="si"){
	$Sapto_para_manipulacion='CHECKED';}

if($al_examen=="si"){
	$Sal_examen='CHECKED';}
if($apto_trabajo_alturas=="si"){
	$Sapto_trabajo_alturas='CHECKED';



}

if($aplazado_final=="si"){
	$Saplazado_final='CHECKED';



}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////777



?>
<?PHP
	$birthday_date = '1986-09-02';
	$current_date = date('Y-m-d'); //today is 2011-10-04
	$diff_in_mill_seconds = strtotime($current_date) - 		strtotime($birthday_date);
		$age = floor($diff_in_mill_seconds / (365.2425 *60*60*24)) + 1; 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Historia Clinica</title>
<style type="text/css">
<!--
.style2 {font-size: 9}
.style3 {font-size: 9px}
.style4 {font-size: 3px}
.style14 {font-size: small}
-->
</style>
</head>
<body>
<label></label>
                    <label></label>
		<?php  
		/*---------------------------------------------------------doctor---------------------------------------------------------*/
		?>			
		
		
		<div align="center">:
          <td width="180">&nbsp;</td>
          <div align="left"></div>
		
		  <div align="left">
		    <?php  
		/*----------------------------------------------------------------------visiometria------------------------------------------------*/
		?>
          </div>
</div>
                    <label></label>
                    <label></label>
                    <?php  
		/*---------------------------------------------------audiometria--------------------------------------------*/
		?>
                    </div>
<label></label>
                    <label></label>
		
		<?php  
		/*----------------------------------------------------antecedentes familiares---------------------------------------------------------------*/
		


$myresult5=mysql_query("SELECT antecedentes_familiares.hta, antecedentes_familiares.phta,antecedentes_familiares.infarto,antecedentes_familiares.pinfarto,antecedentes_familiares.acv,antecedentes_familiares.pacv,antecedentes_familiares.diabetes,antecedentes_familiares.pdiabetes,antecedentes_familiares.asma,antecedentes_familiares.pasma,antecedentes_familiares.tbc,antecedentes_familiares.ptbc,antecedentes_familiares.artritis,antecedentes_familiares.partritis,antecedentes_familiares.enf_mental,antecedentes_familiares.penf_mental,antecedentes_familiares.cancer,antecedentes_familiares.pcancer,antecedentes_familiares.tiroides,antecedentes_familiares.ptiroides,antecedentes_familiares.otros,antecedentes_familiares.potros FROM antecedentes_familiares, historia_clinica WHERE antecedentes_familiares.his_cod_historia_clinica= historia_clinica.cod_historia_clinica and antecedentes_familiares.his_cod_historia_clinica=$cod_his",$link)or die (mysql_error());
for ($i = 0; $i < mysql_numrows($myresult5); $i++) 
{
	$hta_f= mysql_result($myresult5, $i, 0);
	$phta= mysql_result($myresult5, $i, 1);
	$infarto= mysql_result($myresult5, $i, 2);
	$pinfarto= mysql_result($myresult5, $i, 3);
	$acv= mysql_result($myresult5, $i, 4);
	$pacv= mysql_result($myresult5, $i, 5);
	$diabetes= mysql_result($myresult5, $i, 6);
	$pdiabetes= mysql_result($myresult5, $i, 7);
	$asma= mysql_result($myresult5, $i, 8);
	$pasma= mysql_result($myresult5, $i, 9);
	$tbc_f= mysql_result($myresult5, $i, 10);
	$ptbc_f= mysql_result($myresult5, $i, 11);
	$art_f= mysql_result($myresult5, $i, 12);
	$part= mysql_result($myresult5, $i, 13);		
	$em_f= mysql_result($myresult5, $i, 14);
	$pem= mysql_result($myresult5, $i, 15);
	$can= mysql_result($myresult5, $i, 16);
	$pcan= mysql_result($myresult5, $i, 17);
	$ti_f= mysql_result($myresult5, $i, 18);
	$pti_f= mysql_result($myresult5, $i, 19);
	$otros=mysql_result($myresult5, $i, 20);
	$potros=mysql_result($myresult5, $i, 21);
}


if($hta_f =="si"){
					$shta_f='CHECKED';}
				else if($hta_f=="no"){
					$nhta_f='CHECKED';
				}
else if($hta_f==""){
					$nhta_f='CHECKED';
				}
				if($infarto =="si"){
					$sinfar='CHECKED';}
				else if($infarto=="no"){
					$ninfar='CHECKED';
				}else if($infarto==""){
					$ninfar='CHECKED';
				}
				if($acv =="si"){
					$sacv='CHECKED';}
				else if($acv=="no"){
					$nacv='CHECKED';
				}
else if($acv==""){
					$nacv='CHECKED';
				}
				if($diabetes =="si"){
					$sd='CHECKED';}
				else if($diabetes=="no"){
					$nd='CHECKED';
				}else if($diabetes==""){
					$nd='CHECKED';
				}
				if($asma =="si"){
					$sas='CHECKED';}
				else if($asma=="no"){
					$nas='CHECKED';
				}
else if($asma==""){
					$nas='CHECKED';
				}
				if($tbc_f =="si"){
					$st='CHECKED';}
				else if($tbc_f=="no"){
					$nt='CHECKED';
				}
else if($tbc_f==""){
					$nt='CHECKED';
				}
				if($art_f =="si"){
					$sart_f='CHECKED';}
				else if($art_f=="no"){
					$nart_f='CHECKED';
				}
else if($art_f==""){
					$nart_f='CHECKED';
				}
				if($em_f =="si"){
					$sem_f='CHECKED';}
				else if($em_f=="no"){
					$nem_f='CHECKED';
				}
else if($em_f==""){
					$nem_f='CHECKED';
				}
				if($can =="si"){
					$scan='CHECKED';}
				else if($can=="no"){
					$ncan='CHECKED';
				}
else if($can==""){
					$ncan='CHECKED';
				}
				if($ti_f =="si"){
					$sti_f='CHECKED';}
				else if($ti_f=="no"){
					$nti_f='CHECKED';
				}
else if($ti_f==""){
					$nti_f='CHECKED';
				}
				if($otros =="si"){
					$sotros='CHECKED';}
				else if($otros=="no"){
					$notros='CHECKED';
				}
else if($otros==""){
					$notros='CHECKED';
				}




?>
<tr><td width="329"></td>
</tr><tr><td width="87"><table width="948" border="1">
                                <tr>
                                  <td colspan="4"><div align="center"><strong><u>HISTORIA CL&Iacute;NICA</u></strong></div></td>
                                </tr>
                                <tr>
                                  <td colspan="2" rowspan="3" class="style2"><table width="496" height="346" border="1">
                                    <tr>
                                      <td width="126" class="style3">Cedula:</td>
                                      <td width="117" class="style4"><input name="cedula" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value=" <?php   echo $cedula1;?>" size="10" maxlength="30" readonly="readonly" /></td>
                                      <td width="123" class="style3">Direcci&oacute;n</td>
                                      <td width="102" class="style4"><input name="direccion" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $dir;?>" size="10" maxlength="30"/></td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Nombre (s) : </td>
                                      <td class="style4"><input name="primer_nombre" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value=" <?php   echo $p_nom;?>" size="10" maxlength="30" readonly="readonly" /></td>
                                      <td class="style3"> Apellido (s) : </td>
                                      <td class="style4"><input name="apellido" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php   echo $p_ape;?>" size="10" maxlength="30" readonly="readonly"/></td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Examen Solicitado 1:</td>
                                      <td class="style4"><input name="segundo_nombre" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value= " <?php   echo $s_nom;?>" size="25" maxlength="30" readonly="readonly" /></td>
                                      <td class="style3">Examen Solicitado 2 : </td>
                                      <td class="style4"><input name="segundo_apellido" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php   echo $s_ape;?>" size="25" maxlength="30" readonly="readonly"/></td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Fecha Nacimiento: </td>
                                      <td class="style3"><input name="fnaciemiento" style="FONT-SIZE: 9px" type="text"  value="<?php   echo $f_nac; ?>" size="10" maxlength="30" readonly="readonly"/> </td>
                                      <td class="style3">Motivo de Evaluaci&oacute;n : </td>
                                      <td class="style4"><span class="style3">
                                        <select name="Motivo_evaluacion" style="FONT-SIZE: 9px" >
                                          <option value ="<?php   echo $mot; ?>"><?php   echo $mot; ?></option>
                                          <option value="Ingreso">Ingreso</option>
                                          <option value="Periodico">Periodico</option>
                                          <option value="Retiro">Retiro</option>
                                          <option value="Particular">Particular</option>
                                          <option value="Otro">Otro</option>
                                        </select>
                                      </span> </td>
                                    </tr>
                                    <tr>
                                      <td class="style3">G&eacute;nero:</td>
                                      <td class="style4"><span class="style3">
                                        <select name="genero" style="FONT-SIZE: 9px" readonly="readonly">
                                          <option value="<?php   echo $gen; ?>"><?php   echo $gen; ?></option>
                                          <option value="Femenino">Femenino</option>
                                          <option value="Masculino">Masculino</option>
                                        </select>
                                      </span> </td>
                                      <td class="style3">Jornada de Trabajo: </td>
                                      <td class="style4"><span class="style3">
                                        <select name="Jornada_evaluacion" style="FONT-SIZE: 9px">
                                          <option value="<?php  echo $j_tra;?>"><?php  echo $j_tra;?></option>
                                          <option value="Diurno">Diurno</option>
                                          <option value="Nocturno">Periodico</option>
                                          <option value="Rotativo">Rotativo</option>
                                        </select>
                                      </span> </td>
                                    </tr>
                                    <tr>
                                      <td class="style4"><p class="style3">Fecha Recepcion: </p></td>
                                      <td class="style4"><input name="fecha_recepcion" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $fecha_ingreso;?>" size="20" readonly="readonly" /></td>
                                      <td class="style3">Empresa Usuaria: </td>
                                      <td class="style4"><input name="empresa_usuaria" type="text" style="FONT-SIZE: 9px" onchange="valida_registrar()" value="<?php  echo $e_usu;?>" size="10" maxlength="30"/></td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Fecha Ingreso Laboral: </td>
                                      <td class="style4"><input name="fecha_ingreso_laboral" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $f_ing;?>" size="10" readonly="readonly" /></td>
                                      <td class="style3">Empresa Cliente: </td>
                                      <td class="style4"><input name="empresa_cliente" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $emp_cli;?>" size="10" maxlength="30"/></td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Escolaridad :</td>
                                      <td class="style4"><span class="style3">
                                        <select name="Escolaridad" style="FONT-SIZE: 9px" >
                                          <option value="<?php  echo $esc;?>"><?php  echo $esc;?></option>
                                          <option value="Analfabeta">Analfabeta</option>
                                          <option value="Primaria">Primaria</option>
                                          <option value="Secundaria">Secundaria</option>
                                          <option value="Tecnico">Tecnico</option>
                                          <option value="Tecnologo">Tecnologo</option>
                                          <option value="Universitario">Universitario</option>
                                        </select>
                                      </span> </td>
                                      <td class="style3">Natural De: </td>
                                      <td class="style4"><input name="natural_de" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $lu_nac;?>" size="10" maxlength="30" readonly="readonly"/></td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Profesi&oacute;n:</td>
                                      <td class="style4"><input name="profesion" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $pro;?>" size="15" maxlength="30"/></td>
                                      <td class="style3">Tel&eacute;fono</td>
                                      <td class="style4"><input name="telefono" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $tel;?>" size="10" maxlength="30"/></td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Area o Departamento: </td>
                                      <td class="style4"><input name="area_departamento" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()"  value="<?php  echo $dep;?>" size="15" maxlength="30"/></td>
                                      <td class="style3">Estado Civil </td>
                                      <td class="style4"><span class="style3">
                                        <select name="Estado_civil" style="FONT-SIZE: 9px" >
                                          <option value="<?php  echo $est_civ?>"><?php  echo $est_civ?></option>
                                          <option value="Soltero">Soltero</option>
                                          <option value="Casado">Casado</option>
                                          <option value="Union_libre">Union Libre</option>
                                          <option value="Separado">Separado</option>
                                          <option value="Viudo">Viudo</option>
                                        </select>
                                      </span> </td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Cargo A desempe&ntilde;ar </td>
                                      <td class="style4"><input name="cargo_desempeniar" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $car;?>" size="15" maxlength="30"/></td>
                                      <td class="style3">Edad</td>
                                      <td class="style4"><input name="edad_cliente" style="FONT-SIZE: 9px" type="text" onchange="valida_registrar()" value="<?php  echo $edad;?>" size="10" maxlength="30" readonly="readonly" /></td>
                                    </tr>
                                    <tr>
                                      <td class="style3">Historia Clinica:</td>
                                      <td class="style4"><input name="cod_his" type="text" style="FONT-SIZE: 9px"  onchange="valida_registrar()" value=" <?php  echo $cod_his;?>" size="10" maxlength="30" readonly="readonly" /></td>
                                      <td class="style3"><input name="age" type="text" style="FONT-SIZE: 9px"  onchange="valida_registrar()" size = "30"value=<?php echo $age?>></td>
                                      <td class="style3">&nbsp;</td>
                                    </tr>
                                  </table></td>
                                  <td height="89" colspan="2" class="style2"><table width="333" border="1">
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td width="26" height="39"><div align="center" class="style3">EPS</div></td>
                                      <td width="241"><span class="style3">
                                        <label> </label>
  
            </span>
                                        

  <div align="center" class="style3">
                                            <input name="eps" style="FONT-SIZE: 9px" type="text" value="<?php  echo $eps;?>" size="40" />
                                      </div></td>
                                    </tr>
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td height="38"><div align="center" class="style3">ARP</div></td>
                                      <td><div align="center" class="style3">
                                          <input name="arp" style="FONT-SIZE: 9px" type="text" value="<?php  echo $arp;?>" size="40" />
                                      </div></td>
                                    </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="113" colspan="2" class="style2"><table width="335" height="98" border="1">
                                    <tr>
                                      <td colspan="2"><span class="style3">&Uacute;ltimas tres empresas donde trabajo </span></td>
                                      <td width="91"><span class="style3">Cargo Desempe&ntilde;ado </span></td>
                                      <td width="100"><span class="style3">Tiempo laborado </span></td>
                                    </tr>
                                    <tr>
                                      <td width="26">1</td>
                                      <td width="90"><span class="style3">
                                        <label>
                                        <input name="textfield" style="FONT-SIZE: 9px" type="text" value="<?php  echo $ea;?>" size="15" />
                                        </label>
                                      </span></td>
                                      <td width="91"><input name="textfield4" style="FONT-SIZE: 9px" type="text" value="<?php  echo $c_ante;?>" size="15" /></td>
                                      <td width="100"><input name="textfield7" style="FONT-SIZE: 9px" type="text" value="<?php  echo $ta;?>" size="15" /></td>
                                    </tr>
                                    <tr>
                                      <td>2</td>
                                      <td width="90"><input name="textfield2" style="FONT-SIZE: 9px" type="text" value="<?php  echo $ea2;?>" size="15" /></td>
                                      <td width="91"><input name="textfield5" style="FONT-SIZE: 9px" type="text" value="<?php  echo $ca2;?>" size="15" /></td>
                                      <td width="100"><input name="textfield8" style="FONT-SIZE: 9px" type="text" value="<?php  echo $ta2;?>" size="15" /></td>
                                    </tr>
                                    <tr>
                                      <td>3</td>
                                      <td width="90"><input name="textfield3" style="FONT-SIZE: 9px" type="text" value="<?php  echo $ea3;?>" size="15" /></td>
                                      <td width="91"><input name="textfield6" style="FONT-SIZE: 9px" type="text" value="<?php  echo $ca3;?>" size="15" /></td>
                                      <td width="100"><input name="textfield9" style="FONT-SIZE: 9px" type="text" value="<?php  echo $ta3;?>" size="15" /></td>
                                    </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td colspan="2" class="style2"><table width="327" border="1">
                                    <tr>
                                      <td colspan="4"><div align="center" class="style3"><strong><u>AUDIOMETR&Iacute;A</u></strong></div></td>
                                    </tr>
                                    <tr>
                                      <td width="70">&nbsp;</td>
                                      <td width="60"><div align="center" class="style3">NORMAL</div></td>
                                      <td width="60"><div align="center" class="style3">ANORMAL</div></td>
                                      <td width="109"><div align="center" class="style3">OBSERVACIONES</div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="center" class="style3">AUDIOMETR&Iacute;A</div></td>
                                      <td><span class="style3"> <input type="text" name="normal_audi" value="<?php  echo $n_aud;?>" size="10" maxlength="10" onchange="valida_registrar()"/> </span></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="anormal_audi" value="<?php  echo $an_aud;?>" size="10" maxlength="10" onchange="valida_registrar()"/>
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <label>
                                          <input type="text" name="obs_audi" value="<?php  echo $obs_aud;?>" size="10" maxlength="10" onchange="valida_registrar()"/>
                                          </label>
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="center" class="style3">
                                          <p class="style14">VESTIBULAR</p>
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="normal_vest" value="<?php  echo $no_ves;?>" size="10" maxlength="10" onchange="valida_registrar()"/>
                                      </div></td>
                                      <td><input name="anormal_vest" type="text" onchange="valida_registrar()" value="<?php  echo $ano_ves;?>" size="10" maxlength="10"/></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="obs_vest" value="<?php  echo $ob_ves;?>" size="10" maxlength="10" onchange="valida_registrar()"/>
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td colspan="4"><p class="style3">
                                          <label>DIAGN&Oacute;STICO </label>
                                        </p>
                                          <span class="style3">
                                          <textarea name="diagnostico_audi" cols="45" rows="2"><?php  echo $diag_aud;?></textarea>
                                        </span></td>
                                    </tr>
                                  </table></td>
                                </tr>
                                
                                <tr>
                                  <td height="191" colspan="2"><table width="497" border="1">
                                    <tr>
                                      <td width="263"><div align="center" class="style3"><strong><u>ACCIDENTES DE TRABAJO</u> </strong></div></td>
                                      <td width="47"><div align="center" class="style3">SI</div></td>
                                      <td width="42"><div align="center" class="style3">
                                          <input name="adt"  type="radio" value="si" <?php  print $sat1;?> />
                                      </div></td>
                                      <td width="62"><div align="center" class="style3">NO</div></td>
                                      <td width="49"><div align="center" class="style3">
                                          <input name="adt" type="radio" value="no" <?php  print $nat1;?> />
                                      </div></td>
                                    </tr>
                                  </table>
                                    <table width="555" height="95" border="1">
                                      <tr>
                                        <td colspan="2" class="style3"><span class="style3">FECHA</span></td>
                                        <td class="style3"><span class="style3">EMPRESA</span></td>
                                        <td class="style3"><span class="style3">CAUSA</span></td>
                                        <td class="style3"><span class="style3">TIPO DE LESION </span></td>
                                        <td class="style3"><span class="style3">PARTE AFECTADA </span></td>
                                        <td class="style3"><span class="style3">DIAS INCAP. </span></td>
                                        <td class="style3"><span class="style3">SECUELAS</span></td>
                                      </tr>
                                      <tr>
                                        <td class="style3"><span class="style3">1</span></td>
                                        <td class="style3"><span class="style3">
                                          <label>
                                          <input name="textfield10"  style="font-size:10px" "type="text" value="<?php  echo $fat2;?>" size="10" />
                                          </label>
                                        </span></td>
                                        <td class="style3"><input name="textfield104" style="font-size:10px" type="text" value="<?php  echo $eat2;?>" size="12" /></td>
                                        <td class="style3"><input name="textfield107"  style="font-size:10px"  type="text" value="<?php  echo $cat2;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1010" style="font-size:10px" type="text" value="<?php  echo $tat2;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1013" style="font-size:10px" type="text" value="<?php  echo $pat2;?>" size="15" /></td>
                                        <td class="style3"><input name="textfield1016" style="font-size:10px" type="text" value="<?php  echo $iat2;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1019" style="font-size:10px"  type="text" value="<?php  echo $sat2;?>" size="15" /></td>
                                      </tr>
                                      <tr>
                                        <?php  //echo $id_hist_acc_traba1;?>
                                        <td class="style3"><span class="style3">2</span></td>
                                        <td class="style3"><input name="textfield102"   style="font-size:10px"  type="text" value="<?php  echo $fat1;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield105"   style="font-size:10px"  type="text" value="<?php  echo $eat1;?>" size="12" /></td>
                                        <td class="style3"><input name="textfield108"  style="font-size:10px"  type="text" value="<?php  echo $cat1;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1011" style="font-size:10px" type="text" value="<?php  echo $tat1;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1014" style="font-size:10px" type="text" value="<?php  echo $pat1;?>" size="15" /></td>
                                        <td class="style3"><input name="textfield1017" style="font-size:10px" type="text" value="<?php  echo $iat1;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1020" style="font-size:10px" type="text" value="<?php  echo $ssat1;?>" size="15" /></td>
                                      </tr>
                                      <tr>
                                        <td class="style3"><span class="style3">3</span></td>
                                        <td class="style3"><input name="textfield103"   style="font-size:10px"  type="text" value="<?php  echo $fat;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield106" style="font-size:10px"  type="text" value="<?php  echo $eat;?>" size="12" /></td>
                                        <td class="style3"><input name="textfield109"  style="font-size:10px" type="text" value="<?php  echo $cat;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1012" style="font-size:10px" type="text" value="<?php  echo $tat;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1015" style="font-size:10px" type="text" value="<?php  echo $pat;?>" size="15" /></td>
                                        <td class="style3"><input name="textfield1018"  style="font-size:10px"  type="text" value="<?php  echo $iat;?>" size="10" /></td>
                                        <td class="style3"><input name="textfield1021"  style="font-size:10px" type="text" value="<?php  echo $sat;?>" size="15" /></td>
                                      </tr>
                                    </table>
                                  <p>&nbsp;</p></td>
                                  <td height="191" colspan="2"><table width="333" border="1">
                                    <tr>
                                      <td width="25"></td>
                                      <td colspan="2"><div align="center" class="style3">CERCA</div></td>
                                      <td colspan="2"><div align="center" class="style3">LEJOS</div></td>
                                      <td width="76"><div align="center" class="style3">OTROS HALLAZGOS </div></td>
                                    </tr>
                                    <tr>
                                      <td>&nbsp;</td>
                                      <td width="48"><div align="center" class="style3">C.C.</div></td>
                                      <td width="48"><div align="center" class="style3">S.C.</div></td>
                                      <td width="48"><div align="center" class="style3">C.C.</div></td>
                                      <td width="48"><div align="center" class="style3">S.C.</div></td>
                                      <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                      <td><div align="center" class="style3">OD</div></td>
                                      <td><input name="od_cc_cerca" type="text" onchange="valida_registrar()" value="<?php  echo $od_c_c;?>" size="5" maxlength="10"/></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="od_sc_cerca" value="<?php  echo $od_c_s;?>" size="5" maxlength="10" onchange="valida_registrar()"/>
                                      </div></td>
                                      <td><input name="od_cc_lejos" type="text" onchange="valida_registrar()" value="<?php  echo $od_l_c;?>" size="5" maxlength="10"/></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="od_sc_lejos" value="<?php  echo $oi_c_s;?>" size="5" maxlength="10" onchange="valida_registrar()"/>
                                      </div></td>
                                      <td rowspan="2"><div align="center" class="style3">
                                          <label>
                                          <textarea name="textarea11"  cols="10" rows="2"><?php  echo $hall_visi;?></textarea>
                                          </label>
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td height="26"><div align="center" class="style3">OI</div></td>
                                      <td><input name="oi_cc_cerca" type="text" onchange="valida_registrar()" value="<?php  echo $oi_c_c;?>"  size="5" maxlength="10"/></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="oi_sc_cerca" value="<?php  echo $od_l_s;?>" size="5" maxlength="10" onchange="valida_registrar()"/>
                                      </div></td>
                                      <td><input name="oi_cc_lejos" type="text" onchange="valida_registrar()" value="<?php  echo $oi_l_c;?>" size="5" maxlength="10"/></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="oi_sc_lejos" value="<?php  echo $oi_l_s;?>" size="5" maxlength="10" onchange="valida_registrar()"/>
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td height="70" colspan="6"><p class="style2">
                                          <label class="style3">DIAGN&Oacute;STICO </label>
                                        </p>
                                          <textarea name="diagnostico_visiometria"   cols="50" rows="2"><?php  echo $diag_visi;?></textarea>                                      </td>
                                    </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td colspan="2"><table width="522" height="184" border="1">
                                    <tr>
                                      <td colspan="6"><div align="center" class="style3"><strong><u>INMUNIZACI&Ograve;N</u></strong></div></td>
                                    </tr>
                                    <tr>
                                      <td width="53"><span class="style3"></span></td>
                                      <td width="22"><span class="style3">SI</span></td>
                                      <td width="22"><span class="style3">NO</span></td>
                                      <td width="3">&nbsp;</td>
                                      <td width="204"><span class="style3">FECHA</span></td>
                                      <td width="178"><span class="style3">DOSIS</span></td>
                                    </tr>
                                    <tr>
                                      <td width="53"><span class="style3">HEPATITS B </span></td>
                                      <td><div align="center" class="style3">
                                          <input name="hepatitisb" type="radio" value="si" <?php  print $shepat;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <input name="hepatitisb" type="radio" value="no" <?php  print $nhepat;?> />
                                      </div></td>
                                      <td>&nbsp;</td>
                                      <td><input name="textfield102151962" type="text" value="<?php  echo $f_hepat;?>" size="15" /></td>
                                      <td><input name="textfield102151967" type="text"  value="<?php  echo $d_hepat;?>" size="15" /></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">FIEBRE AMARILLA </span></td>
                                      <td><div align="center" class="style3">
                                          <input name="famarilla" type="radio" value="si" <?php  print $sfa;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <input name="famarilla" type="radio" value="no" <?php  print $nfa;?> />
                                      </div></td>
                                      <td>&nbsp;</td>
                                      <td><input name="textfield102151963" type="text"  value="<?php  echo $ffa;?>" size="15" /></td>
                                      <td><input name="textfield1021519672" type="text"  value="<?php  echo $dfa;?>" size="15" /></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">TETANOS</span></td>
                                      <td><div align="center" class="style3">
                                          <input name="tetanos" type="radio" value="si" <?php  print $stetano;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <input name="tetanos" type="radio" value="no" <?php  print $ntetano;?> />
                                      </div></td>
                                      <td>&nbsp;</td>
                                      <td><input name="textfield102151964" type="text"  value="<?php  echo $ftetano;?>" size="15" /></td>
                                      <td><input name="textfield1021519673" type="text"  value="<?php  echo $dtetano;?>" size="15" /></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">INFLUENZA</span></td>
                                      <td><div align="center" class="style3">
                                          <input name="influenza" type="radio" value="si" <?php  print $sinf;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <input name="influenza" type="radio" value="no" <?php  print $ninf;?> />
                                      </div></td>
                                      <td>&nbsp;</td>
                                      <td><input name="textfield102151965" type="text"  value="<?php  echo $finf;?>" size="15" /></td>
                                      <td><input name="textfield1021519674" type="text"  value="<?php  echo $dinf;?>" size="15" /></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">TRAE CARNET </span></td>
                                      <td><div align="center" class="style3">
                                          <input name="tcarnet" type="radio" value="si" <?php  print $scarnet;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <input name="tcarnet" type="radio" value="no" <?php  print $ncarnet;?> />
                                      </div></td>
                                      <td>&nbsp;</td>
                                      <td>&nbsp;</td>
                                      <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">OTROS</span></td>
                                      <td colspan="5"><span class="style3">
                                        <textarea name="textarea6" cols="40"><?php  echo $otr;?></textarea>
                                      </span></td>
                                    </tr>
                                  </table></td>
                                  <td colspan="2"><table width="411" border="1">
                                    <tr>
                                      <td height="23" colspan="12"><div align="center" class="style3"><strong><u>H&Agrave;BITOS T&Ograve;XICOS </u></strong></div></td>
                                    </tr>
                                    <tr>
                                      <td width="76" height="50"><div align="center" class="style3">FUMA</div></td>
                                      <td width="1"><span class="style3"></span></td>
                                      <td width="10"><div align="center" class="style3">SI</div></td>
                                      <td width="20"><div align="center" class="style3">
                                          <input name="fuma" type="radio" value="si" <?php  print $sfuma;?> />
                                      </div></td>
                                      <td width="18"><div align="center" class="style3">NO </div></td>
                                      <td width="20"><div align="left" class="style3">
                                          <input name="fuma" type="radio" value="no" <?php  print $nfuma;?> />
                                      </div></td>
                                      <td width="1"><span class="style3"></span></td>
                                      <td width="66"><div align="center" class="style3">CANTIDA DE CIGARRILLOS </div></td>
                                      <td colspan="4"><div align="center" class="style3">
                                          <input name="textfield1252" type="text" size="20" value="<?php  echo $ccig;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td height="44"><div align="center" class="style3">EXFUMADOR</div></td>
                                      <td><span class="style3"></span></td>
                                      <td><div align="center" class="style3">SI</div></td>
                                      <td><div align="center" class="style3">
                                          <input name="exfumador" type="radio" value="si" <?php  print $sexf;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">NO </div></td>
                                      <td><div align="left" class="style3">
                                          <input name="exfumador" type="radio" value="no" <?php  print $nexf;?> />
                                      </div></td>
                                      <td><span class="style3"></span></td>
                                      <td><div align="center" class="style3">TIEMPO</div></td>
                                      <td width="62"><div align="center" class="style3">
                                          <input name="textfield12522" type="text" size="10" value="<?php  echo $tf;?>" />
                                      </div></td>
                                      <td width="9"><div align="center"><span class="style3"></span></div></td>
                                      <td><div align="center"><span class="style3"></span></div></td>
                                      <td width="52"><div align="center"><span class="style3"></span></div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="center" class="style3">BEBIDAS ALCOHOLICAS </div></td>
                                      <td><span class="style3"></span></td>
                                      <td><div align="center" class="style3">SI</div></td>
                                      <td><div align="center" class="style3">
                                          <input name="radiobutton" type="radio" value="si" <?php  print $sba;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">NO </div></td>
                                      <td><div align="left" class="style3">
                                          <input name="radiobutton" type="radio" value="no" <?php  print $nba;?> />
                                      </div></td>
                                      <td><span class="style3"></span></td>
                                      <td><div align="center" class="style3">FRECUENCIA</div></td>
                                      <td colspan="3"><div align="center" class="style3">
                                          <input name="textfield12523" type="text" size="10" value="<?php  echo $fb;?>" />
                                      </div></td>
                                      <td><div align="center"><span class="style3"></span></div></td>
                                    </tr>
                                  </table></td>
                                </tr>
                                
                                <tr>
                                  <td colspan="2" rowspan="2"><table width="494" border="1">
                                    <tr>
                                      <td colspan="8"><div align="center" class="style3"><strong><u>FACTORES O AGENTES DE RIESGO PRESENTES EN LOS CARGOS DESEMPE&Ntilde;ADOS (ACTUAL Y ANTERIORES) </u></strong></div></td>
                                    </tr>
                                    <tr>
                                      <td width="164"><span class="style3"></span></td>
                                      <td width="20"><span class="style3">E1</span></td>
                                      <td width="20"><span class="style3">E2</span></td>
                                      <td width="20"><span class="style3">E3</span></td>
                                      <td width="158"><span class="style3"></span></td>
                                      <td width="20"><span class="style3">E1</span></td>
                                      <td width="20"><span class="style3">E2</span></td>
                                      <td width="20"><span class="style3">E3</span></td>
                                    </tr>
                                    <tr>
                                      <td><u><span class="style3"><strong>SEGURIDAD</strong></span></u></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"><strong><u>BIOL&Oacute;GICOS</u></strong></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">ELECTRICOS</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_electricos" value="e1"<?php  print $e1_electricos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_electricos" value="e2"<?php  print $e2_electricos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_electricos" value="e3"<?php  print $e2_electricos;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">MICROORGANISMOS</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_microorganismos" value="e1"<?php  print $e1_micro;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_microorganismos" value="e2" <?php  print $e2_micro;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_microorganismos" value="e3"<?php  print $e3_micro;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">INCENDIO</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_incendio" value="e1"<?php  print $e1_incendio;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_incendio" value="e2"<?php  print $e2_incendio;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_incendio" value="e3"<?php  print $e3_incendio;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">ANIMALES</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_animales" value="e1" <?php  print $e1_ani;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_animales" value="e2" <?php  print $e2_ani;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_animales" value="e3"<?php  print $e3_ani;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">EXPLOSI&Oacute;N</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_explosion" value="e1"<?php  print $e1_explosion;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_explosion" value="e2"<?php  print $e2_explosion;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_explosion" value="e3"<?php  print $e3_explosion;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">VEGETALES</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_vegetales" value="e1"<?php  print $e1_veg;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_vegetales" value="e2"<?php  print $e2_veg;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_vegetales" value="e3"<?php  print $e3_veg;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">MEC&Aacute;NICOS</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_mecanicos" value="e1"<?php  print $e1_mecanicos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_mecanicos" value="e2"<?php  print $e2_mecanicos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_mecanicos" value="e3"<?php  print $e3_mecanicos;?> />
                                      </div></td>
                                      <td><span class="style3"><strong><u>ERGON&Oacute;MICOS</u></strong></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">LOCATIVOS</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_locativos" value="e1"<?php  print $e1_locativos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_locativos" value="e2"<?php  print $e2_locativos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_locativos" value="e3"<?php  print $e3_locativos;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">CARGA DIN&Aacute;MICA </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_carga_dinamica" value="e1"<?php  print $e1_carga_dinamica;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_carga_dinamica" value="e2"<?php  print $e2_carga_dinamica;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_carga_dinamica" value="e3"<?php  print $e3_carga_dinamica;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">DESPLAZAMIENTO</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_desplazamiento" value="e1"<?php  print $e1_desplazamiento;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_desplazamiento" value="e2"<?php  print $e2_desplazamiento;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3"<?php  print $e2_electricos;?>>
                                          <input type="checkbox" name="e3_desplazamiento" value="e3"<?php  print $e3_desplazamiento;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">CARGA EST&Aacute;TICA </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_carga_estatica" value="e1"<?php  print $e1_carga_estatica;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_carga_estatica" value="e2"<?php  print $e2_carga_estatica;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_carga_estatica" value="e3"<?php  print $e3_carga_estatica;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">ORDEN PUBLICO </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_orden_publico" value="e1"<?php  print $e1_orden;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_orden_publico" value="e2"<?php  print $e2_orden;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_orden_publico" value="e3"<?php  print $e3_orden;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">DISE&Ntilde;O DE PUESTOS </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_disenio_de_puestos" value="e1"<?php  print $e1_disenio_de_puestos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_disenio_de_puestos" value="e2"<?php  print $e2_disenio_de_puestos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_disenio_de_puestos" value="e3"<?php  print $e3_disenio_de_puestos;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">FENOMENOS NATURALES </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_fenomenos_naturales" value="e1"<?php  print $e1_fenomenos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_fenomenos_naturales" value="e2"<?php  print $e2_fenomenos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_fenomenos_naturales" value="e3"<?php  print $e3_fenomenos;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">MANEJO DE CARGAS </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_manejo_de_cargas" value="e1"<?php  print $e1_manejo_de_cargas;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_manejo_de_cargas" value="e2" <?php  print $e2_manejo_de_cargas;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_manejo_de_cargas" value="e3"<?php  print $e3_manejo_de_cargas;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3"><strong><u>PSICOLABORALES</u></strong></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><div align="left" class="style3">MOVIMIENTOS REPETITIVOS </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_movimientos_repetitivos" value="e1"<?php  print $e1_movimientos_repetitivos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_movimientos_repetitivos" value="e2"<?php  print $e2_movimientos_repetitivos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_movimientos_repetitivos" value="e3"<?php  print $e3_movimientos_repetitivos;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">CONTENIDO DE LA TAREA </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_contenido_de_la_tarea" value="e1"<?php  print $e1_contenido_de_la_tarea;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_contenido_de_la_tarea" value="e2"<?php  print $e2_contenido_de_la_tarea;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_contenido_de_la_tarea" value="e3"<?php  print $e3_contenido_de_la_tarea;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">VIDEOTERMINALES</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_videoterminales" value="e1" <?php  print $e1_videoterminales;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_videoterminales" value="e2"<?php  print $e2_videoterminales;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_videoterminales" value="e3"<?php  print $e3_videoterminales;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">ORGANIZACION DEL TIEMPO </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_organizacion_del_tiempo" value="e1" <?php  print $e1_organizacion_del_tiempo;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_organizacion_del_tiempo" value="e2"<?php  print $e2_organizacion_del_tiempo;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_organizacion_del_tiempo" value="e3"<?php  print $e3_organizacion_del_tiempo;?> />
                                      </div></td>
                                      <td><span class="style3"><strong><u>QU&Iacute;MICOS</u></strong></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">RELACIONES HUMANAS </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_relaciones_humanas" value="e1"<?php  print $e1_relaciones_humanas;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_relaciones_humanas" value="e2"<?php  print $e2_relaciones_humanas;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_relaciones_humanas" value="e3"<?php  print $e3_relaciones_humanas;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">GASES</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_gases" value="e1" <?php  print $e1_gases;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_gases" value="e2"<?php  print $e2_gases;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_gases" value="e3"<?php  print $e3_gases;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">GEST&Iacute;ON</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_gestion" value="e1"<?php  print $e1_gestion;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_gestion" value="e2"<?php  print $e2_gestion;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_gestion" value="e3"<?php  print $e3_gestion;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">HUMOS</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_humos" value="e1"<?php  print $e1_humos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_humos" value="e2"<?php  print $e2_humos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_humos" value="e3"<?php  print $e3_humos;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">AMBIENTE F&Iacute;SICO DE TRABAJO </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_ambiente_fisico_de_trabajo" value="e1" <?php  print $e1_ambiente_fisico_de_trabajo;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_ambiente_fisico_de_trabajo" value="e2"<?php  print $e2_ambiente_fisico_de_trabajo;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_ambiente_fisico_de_trabajo" value="e3"<?php  print $e3_ambiente_fisico_de_trabajo;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">POLVOS</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_polvos" value="e1"<?php  print $e1_polvos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_polvos" value="e2"<?php  print $e2_polvos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_polvos" value="e3"<?php  print $e3_polvos;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3"><strong><u>F&Iacute;SICOS</u></strong></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><span class="style3"></span></td>
                                      <td><div align="left" class="style3">L&Iacute;QUIDOS</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_liquidos" value="e1"<?php  print $e1_liquidos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_liquidos" value="e2"<?php  print $e2_liquidos;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_liquidos" value="e3"<?php  print $e3_liquidos;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">ILUMINACI&Oacute;N</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_iluminacion" value="e1"<?php  print $e1_iluminacion;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_iluminacion" value="e2"<?php  print $e2_iluminacion;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_iluminacion" value="e3"<?php  print $e3_iluminacion;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">VAPORES</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_vapores" value="e1"<?php  print $e1_vapores;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_vapores" value="e2"<?php  print $e2_vapores;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_vapores" value="e3"<?php  print $e3_vapores;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">RADIACIONES IONIZANTES </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_radiaciones_ionizantes" value="e1" <?php  print $e1_radiaciones_ionizantes;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_radiaciones_ionizantes" value="e2"<?php  print $e2_radiaciones_ionizantes;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_radiaciones_ionizantes" value="e3"<?php  print $e3_radiaciones_ionizantes;?> />
                                      </div></td>
                                      <td><div align="left" class="style3">FIBRAS</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_fibras" value="e1"<?php  print $e1_fibras;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_fibras" value="e2"<?php  print $e2_fibras;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_fibras" value="e3"<?php  print $e3_fibras;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">RADIACIONES NO IONIZANTES </span></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_radiaciones-no_ionizantes" value="e1" <?php  print $e1_radiaciones_no_ionizantes;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_radiaciones-no_ionizantes" value="e2"<?php  print $e2_radiaciones_no_ionizantes;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_radiaciones-no_ionizantes" value="e3"<?php  print $e3_radiaciones_no_ionizantes;?> />
                                      </div></td>
                                      <td colspan="4" rowspan="6"><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span><span class="style3"></span></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">RUIDO</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_ruido" value="e1"<?php  print $e1_ruido;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_ruido" value="e2"<?php  print $e2_ruido;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_ruido" value="e3"<?php  print $e3_ruido;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">TEMPERATURA ALTA </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_temperatura_alta" value="e1"<?php  print $e1_temperatura_alta;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_temperatura_alta" value="e2"<?php  print $e2_temperatura_alta;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_temperatura_alta" value="e3"<?php  print $e3_temperatura_alta;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">TEMPERATURA BAJA </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_temperatura_baja" value="e1"<?php  print $e1_temperatura_baja;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_temperatura_baja" value="e2"<?php  print $e2_temperatura_baja;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_temperatura_baja" value="e3"<?php  print $e3_temperatura_baja;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">VIBRACIONES</div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_vibraciones" value="e1"<?php  print $e1_vibraciones;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_vibraciones" value="e2"<?php  print $e2_vibraciones;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_vibraciones" value="e3"<?php  print $e3_vibraciones?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">PRESI&Oacute;N BAROM&Eacute;TRICA </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e1_presion_barometrica" value="e1"<?php  print $e1_barometrica;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e2_presion_barometrica" value="e2"<?php  print $e2_barometrica;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="e3_presion_barometrica" value="e3"<?php  print $e3_barometrica;?> />
                                      </div></td>
                                    </tr>
                                  </table>                                    
                                    <table width="495" border="1">
                                      <tr>
                                        <td colspan="4"><div align="center" class="style3"><strong><u>SIGNOS VITALES</u></strong> </div></td>
                                      </tr>
                                      <tr>
                                        <td width="51"><span class="style3">G.S/RH:</span></td>
                                        <td width="212"><input name="textfield132" type="text" value="<?php  echo $rh;?>" size="20" /></td>
                                        <td width="25"><span class="style3">FR: </span></td>
                                        <td width="179"><span class="style3">
                                          <input name="textfield162" type="text" value="<?php  echo $fr;?>" size="20" />
                                        min</span></td>
                                      </tr>
                                      <tr>
                                        <td><span class="style3">TEMP:</span></td>
                                        <td width="212"><span class="style3">
                                          <label>
                                          <input name="textfield13" type="text" value="<?php  echo $temp;?>" size="20" />
                                            &ordm;C</label>
                                        </span></td>
                                        <td><span class="style3">TA:
                                          <label></label>
                                        </span></td>
                                        <td><span class="style3">
                                          <input name="textfield16" type="text" value="<?php  echo $tasv;?>" size="20" />
                                          Mmhg</span></td>
                                      </tr>
                                      <tr>
                                        <td><span class="style3">TALLA:</span></td>
                                        <td><span class="style3">
                                          <label>
                                          <input name="textfield14" type="text" value="<?php  echo $talla;?>" size="20" />
                                            m</label>
                                        </span></td>
                                        <td><span class="style3">FC: </span></td>
                                        <td><span class="style3">
                                          <input name="textfield163" type="text" value="<?php  echo $fc;?>" size="20" />
                                          min</span></td>
                                      </tr>
                                      <tr>
                                        <td><span class="style3">PESO:</span></td>
                                        <td><span class="style3">
                                          <label>
                                          <input name="textfield15" type="text" value="<?php  echo $peso;?>" size="20" />
                                            KG</label>
                                        </span></td>
                                        <td><span class="style3">IMC: </span></td>
                                        <td><span class="style3">
                                          <input name="textfield1632" type="text" value="<?php  echo $imc;?>" size="20" />
                                          Kg/m<sup>2</sup></span></td>
                                      </tr>
                                    </table>                                   </td>
                                  <td colspan="2"><table width="333" border="1">
                                    <tr>
                                      <td colspan="2"><div align="center" class="style3"><strong><u>RESULTADO</u></strong></div></td>
                                    </tr>
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td width="133" height="39"><div align="center" class="style3">SEROLOG&Iacute;A</div></td>
                                      <td width="184"><span class="style3">
                                          <label>
                                          </span>
                                          <div align="center" class="style3">
                                            <input type="text" name="serologia" value="<?php  echo $sero;?>" />
                                          </div>
                                        <span class="style3">
                                          </label>
                                        </span></td>
                                    </tr>
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td height="38"><div align="center" class="style3">FROTIS FAR&Iacute;NGEO </div></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="frotis_faringeo" value="<?php  echo $fro;?>" />
                                      </div></td>
                                    </tr>
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td height="33"><div align="center" class="style3">KOH</div></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="koh" value="<?php  echo $koh;?>" />
                                      </div></td>
                                    </tr>
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td height="34"><div align="center" class="style3">COPROL&Oacute;GICO</div></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="coprologico" value="<?php  echo $co;?>" />
                                      </div></td>
                                    </tr>
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td height="33"><div align="center" class="style3">PARCIAL DE ORINA </div></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="parcial_de_orina" value="<?php  echo $par;?>" />
                                      </div></td>
                                    </tr>
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td height="41"><div align="center" class="style3">PERFIL LUP&Iacute;DICO </div></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="perfil_lupidico" value="<?php  echo $lip;?>" />
                                      </div></td>
                                    </tr>
                                    <tr bordercolor="#0099FF" bgcolor="#FFFFFF">
                                      <td height="50"><div align="center" class="style3">CUADRO HEM&Aacute;TICO </div></td>
                                      <td><div align="center" class="style3">
                                          <input type="text" name="cuadro_hematico" value="<?php  echo $cua_h;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2"><span class="style3">
                                        <label></label>
                                        <textarea name="diagnostico_resultados" cols="30"><?php  echo $imp_dig;?></textarea>
                                        MPRESI&Oacute;N DIAGN&Oacute;STICO</span></td>
                                    </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="446" colspan="2"><table width="333" border="1">
                                    <tr>
                                      <td colspan="6"><div align="center" class="style3"><strong><u>EXAMEN F&Iacute;SICO </u></strong></div></td>
                                    </tr>
                                    <tr>
                                      <td width="99"><span class="style3"><strong>ORGANO</strong></span></td>
                                      <td width="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3"><strong>N</strong></span></td>
                                      <td width="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3"><strong>AN</strong></span></td>
                                      <td width="114"><span class="style3"><strong>ORGANO</strong></span></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3"><strong>N</strong></div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3"><strong>AN</strong></span></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">ABD&Oacute;MEN</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef1" type="radio" value="n"<?php  print $ncasilla1;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef1" type="radio" value="an"<?php  print $ancasilla1;?> />
                                      </div></td>
                                      <td><span class="style3">CABEZA</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef13" type="radio" value="n"<?php  print $ncasilla2;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef13" type="radio" value="an"<?php  print $ancasilla2;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">GENITALES EXT. </span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef2" type="radio" value="n"<?php  print $ncasilla3;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef2" type="radio" value="an"<?php  print $ancasilla3;?> />
                                      </div></td>
                                      <td><span class="style3">OJOS</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef14" type="radio" value="n"<?php  print $ncasilla4;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef14" type="radio" value="an"<?php  print $ancasilla4;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">HERNIAS</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef3" type="radio" value="n"<?php  print $ncasilla5;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef3" type="radio" value="an"<?php  print $ancasilla5;?> />
                                      </div></td>
                                      <td><span class="style3">CONJUNTIVA</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef15" type="radio" value="n"<?php  print $ncasilla6;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef15" type="radio" value="an"<?php  print $ancasilla6;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">MIEMBRO INFERIOR </span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef4" type="radio" value="n"<?php  print $ncasilla7;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef4" type="radio" value="an"<?php  print $ancasilla7;?> />
                                      </div></td>
                                      <td><span class="style3">NARIZ</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef16" type="radio" value="n"<?php  print $ncasilla8;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef16" type="radio" value="an"<?php  print $ancasilla8;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">MIEMBRO SUPERIOR </span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef5" type="radio" value="n"<?php  print $ncasilla9;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef5" type="radio" value="an"<?php  print $ancasilla9;?> />
                                      </div></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">OROFARINGE</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef17" type="radio" value="n"<?php  print $ncasilla9;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef17" type="radio" value="an"<?php  print $ancasilla9;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">COLUMNA</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef6" type="radio" value="n"<?php  print $ncasilla10;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef6" type="radio" value="an"<?php  print $ancasilla10;?> />
                                      </div></td>
                                      <td><span class="style3">DENTADURA</span></td>
                                      <td width="20" height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef18" type="radio" value="n"<?php  print $ncasilla11;?> />
                                      </div></td>
                                      <td width="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef18" type="radio" value="an"<?php  print $ancasilla11;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">PIEL Y FANEAS </span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef7" type="radio" value="n"<?php  print $ncasilla12;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef7" type="radio" value="an"<?php  print $ancasilla12;?> />
                                      </div></td>
                                      <td><span class="style3">OIDOS</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef19" type="radio" value="n"<?php  print $ncasilla13;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef19" type="radio" value="an"<?php  print $ancasilla13;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">NEUR&Oacute;LOGO</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef8" type="radio" value="n"<?php  print $ncasilla14;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef8" type="radio" value="an"<?php  print $ancasilla14;?> />
                                      </div></td>
                                      <td><span class="style3">CUELLO</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef20" type="radio" value="n" <?php  print $ncasilla15;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef20" type="radio" value="an" <?php  print $ancasilla15;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">REFLEJOS TEND. </span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef9" type="radio" value="n"<?php  print $ncasilla16;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef9" type="radio" value="an"<?php  print $ancasilla16;?> />
                                      </div></td>
                                      <td><span class="style3">TORAX</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center"><span class="style3"></span> </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef21" type="radio" value="an"<?php  print $ancasilla17;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">TINNEL</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef10" type="radio" value="n"<?php  print $ncasilla18;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef10" type="radio" value="an"<?php  print $ancasilla18;?> />
                                      </div></td>
                                      <td><span class="style3">SENOS</span></td>
                                      <td height="20" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef22" type="radio" value="n"<?php  print $ncasilla19;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef22" type="radio" value="an"<?php  print $ancasilla19;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">FHALLEN</span></td>
                                      <td height="29" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef11" type="radio" value="n"<?php  print $ncasilla20;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef11" type="radio" value="an"<?php  print $ancasilla20;?> />
                                      </div></td>
                                      <td><span class="style3">RUIDOS RESPIRATORIOS</span></td>
                                      <td height="29" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef23" type="radio" value="n"<?php  print $ncasilla21;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef23" type="radio" value="an"<?php  print $ancasilla21;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">OTROS</span></td>
                                      <td height="24" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef12" type="radio" value="n"<?php  print $ncasilla22;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef12" type="radio" value="an"<?php  print $ancasilla22;?> />
                                      </div></td>
                                      <td><span class="style3">RUIDOS CARDIACOS</span></td>
                                      <td height="24" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef24" type="radio" value="n"<?php  print $ncasilla23;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_ef24" type="radio" value="an"<?php  print $ancasilla23;?> />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td height="24" colspan="6" bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3">DESCRIPCION:
                                        <label> <br />
                                            <textarea name="inf_examen_fisico" cols="40"><?php  echo $inf_examen_fisico;?></textarea>
                                      </label>
                                      </span></td>
                                    </tr>
                                  </table></td>
                                </tr>
                                
                                <tr>
                                  <td colspan="3"><table width="491" height="242" border="1">
                                    <tr>
                                      <td height="22" colspan="9"><div align="center" class="style3"><u><strong>GINECO-OBST&Egrave;TRICOS</strong> </u></div></td>
                                    </tr>
                                    <tr>
                                      <td height="22" colspan="5"><div align="center" class="style3"><u>PARIDAD</u></div></td>
                                      <td width="60"><div align="center" class="style3"><u>MENARQU&Igrave;A</u></div></td>
                                      <td width="60"><div align="center" class="style3"><u>CICLOS</u></div></td>
                                      <td width="60"><div align="center" class="style3"><u>FUM</u></div></td>
                                      <td width="78"><div align="center" class="style3"><u>FUP</u></div></td>
                                    </tr>
                                    <tr>
                                      <td height="68" colspan="5"><div align="center" class="style3">
                                          <table width="184" border="1">
                                            <tr>
                                              <td width="20"><div align="center">G</div></td>
                                              <td width="20"><div align="center">P</div></td>
                                              <td width="20"><div align="center">A</div></td>
                                              <td width="20"><div align="center">C</div></td>
                                              <td width="20"><div align="center">E</div></td>
                                              <td width="20"><div align="center">M</div></td>
                                              <td width="86"><div align="center">V</div></td>
                                            </tr>
                                           
                                            <tr>
                                              <td><div align="center">
                                                  <label>
                                                  <input name="checkbox" type="text" value="<?php  print $pg?>" size="2"  />
                                                  </label>
                                              </div></td>
                                              <td><div align="center">
                                                  <input name="checkbox2" type="text" value="<?php  print $pp?>" size="2"   />
                                              </div></td>
                                              <td><div align="center">
                                                  <input name="checkbox3" type="text" value="<?php  print $pa?>" size="2"   />
                                              </div></td>
                                              <td><div align="center">
                                                  <input name="checkbox4" type="text" value="<?php  print $pc?>" size="2"   />
                                              </div></td>
                                              <td><div align="center">
                                                  <input name="checkbox5" type="text" value="<?php  print $pe?>" size="2"   />
                                              </div></td>
                                              <td><div align="center">
                                                  <input name="checkbox6" type="text" value="<?php  print $pm?>" size="2"   />
                                              </div></td>
                                              <td><div align="center">
                                                  <input name="checkbox7" type="text" value="<?php  print $pv?>" size="2"   />
                                              </div></td>
                                            </tr>
                                          </table>
                                      </div></td>
                                      <td><label> <span class="style3"> </span> </label>
                                          <div align="center" class="style3">
                                            <input name="textfield12" type="text" size="10" value="<?php  echo $mena;?>" />
                                          </div>
                                        <span class="style3"> </span></td>
                                      <td><div align="center" class="style3">
                                          <input name="textfield122" type="text" size="10" value="<?php  echo $ciclos;?>" />
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <input name="textfield123" type="text" size="10" value="<?php  echo $fum;?>" />
                                      </div></td>
                                      <td><div align="center" class="style3">
                                          <input name="textfield124" type="text" size="10" value="<?php  echo $fup;?>" />
                                      </div></td>
                                    </tr>
                                    <?php  

if($pla=="si")
{
$spla='CHECKED';

}
else if($pla=="no")
{
$npla='CHECKED';
}
if($cito=="si")
{
$scito='CHECKED';
}
else if($cito=="no")
{
$ncito='CHECKED';
}
?>
                                    <tr>
                                      <td width="79" height="38"><div align="center" class="style3">PLANIFICA</div></td>
                                      <td width="20"><div align="center" class="style3">NO</div></td>
                                      <td width="26"><label> <span class="style3"> </span> </label>
                                          <div align="center" class="style3">
                                            <input name="planifica" type="radio" value="no" <?php  print $npla;?> />
                                          </div>
                                      <span class="style3"> </span></td>
                                      <td width="13"><div align="center" class="style3">SI</div></td>
                                      <td width="37"><div align="center" class="style3">
                                          <input name="planifica" type="radio" value="si" <?php  print $spla;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">METODO</div></td>
                                      <td colspan="3"><label> <span class="style3"> </span> </label>
                                          <div align="center" class="style3">
                                            <textarea name="textarea7" rows="1"><?php  echo $mpla;?></textarea>
                                          </div>
                                        <span class="style3"> </span></td>
                                    </tr>
                                    <tr>
                                      <td height="38"><div align="center" class="style3">CITOLOG&Igrave;A</div></td>
                                      <td><div align="center" class="style3">NO</div></td>
                                      <td><label> <span class="style3"> </span> </label>
                                          <div align="center" class="style3">
                                            <input name="citologia" type="radio" value="no" <?php  print $ncito;?> />
                                          </div>
                                        <span class="style3"> </span></td>
                                      <td><div align="center" class="style3">SI</div></td>
                                      <td><div align="center" class="style3">
                                          <input name="citologia" type="radio" value="si" <?php  print $scito;?> />
                                      </div></td>
                                      <td><div align="center" class="style3">FECHA</div></td>
                                      <td colspan="3"><label> <span class="style3"> </span> </label>
                                          <div align="center" class="style3">
                                            <input name="textfield125" type="text" size="10" value="<?php  echo $fecha_cito;?>" />
                                          </div>
                                        <span class="style3"> </span></td>
                                    </tr>
                                    <tr>
                                      <td height="38"><div align="center" class="style3">RESULTADO</div></td>
                                      <td colspan="8"><div align="center" class="style3">
                                          <textarea name="textarea9" cols="60"><?php  echo $resu;?></textarea>
                                      </div></td>
                                    </tr>
                                  </table></td>
                                  <td width="424"><table width="329" border="1">
                                    <tr>
                                      <td colspan="2"><div align="center" class="style3"><strong><u>ANTECEDENTES QUIR&Ugrave;RGICOS Y TRAUMATICOS </u></strong></div></td>
                                    </tr>
                                    <tr>
                                      <td width="175">&nbsp;</td>
                                      <td width="138"><div align="center" class="style3"><u>FECHA</u></div></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">
                                        <label>
                                        <textarea name="textarea2" cols="20"><?php  echo $aqt;?></textarea>
                                        </label>
                                      </span></td>
                                      <td><span class="style3">
                                        <label>
                                        <input name="textfield11" type="text" value="<?php  echo $fqt;?>" size="15" />
                                        </label>
                                      </span></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">
                                        <textarea name="textarea3" cols="20"><?php  echo $aqt2;?></textarea>
                                      </span></td>
                                      <td><input name="textfield112" type="text" value="<?php  echo $fqt2;?>" size="15" /></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">
                                        <textarea name="textarea4" cols="20"><?php  echo $aqt3;?></textarea>
                                      </span></td>
                                      <td><input name="textfield113" type="text" value="<?php  echo $fqt3;?>" size="15" /></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">
                                        <textarea name="textarea5" cols="20"><?php  echo $aqt4;?></textarea>
                                      </span></td>
                                      <td><input name="textfield114" type="text" value="<?php  echo $fqt4;?>" size="15" /></td>
                                    </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td width="295" height="513"><table width="268" border="1">
                                    <tr>
                                      <td colspan="2"><div align="center" class="style3"><u><strong>ANTECENDENTES PERSONALES</strong></u></div></td>
                                    </tr>
                                    <tr>
                                      <td width="135"><table width="135" border="1">
                                          <tr>
                                            <td width="73"><span class="style3"></span></td>
                                            <td width="20"><span class="style3">SI</span></td>
                                            <td width="20"><span class="style3">NO</span></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">CEFALEA</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="cefalea" type="radio" value="si" <?php  print $sce;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="cefalea" type="radio" value="no" <?php  print $nce;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">DEF. VISUAL </span></td>
                                            <td><div align="center" class="style3">
                                                <input name="defvisual" type="radio" value="si" <?php  print $sdv;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="defvisual" type="radio" value="no" <?php  print $ndv;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">USA LENTES/GAFAS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="lentes" type="radio" value="si" <?php  print $sul;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="lentes" type="radio" value="no"<?php  print $nul;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">SORDERA</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="sordera" type="radio" value="si" <?php  print $sso;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="sordera" type="radio" value="no" <?php  print $nso;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">OTITIS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="otitis" type="radio" value="si" <?php  print $sot;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="otitis" type="radio" value="no" <?php  print $not;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">SINUSITIS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="sinusitis" type="radio" value="si" <?php  print $ssi;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="sinusitis" type="radio" value="no" <?php  print $nsi;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">RINITIS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="rinitis" type="radio" value="si" <?php  print $sri;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="rinitis" type="radio" value="no" <?php  print $nri;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">CONVULCIONES</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="convulciones" type="radio" value="si" <?php  print $sco;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="convulciones" type="radio" value="no" <?php  print $nco;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">HTA</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="hta1" type="radio" value="si" <?php  print $shta;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="hta1" type="radio" value="no" <?php  print $nhta;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">ENF. CARDIACAS </span></td>
                                            <td><div align="center" class="style3">
                                                <input name="cardiacas" type="radio" value="si" <?php  print $sec;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="cardiacas" type="radio" value="no" <?php  print $nec;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">HEPATITIS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="hepatitis" type="radio" value="si" <?php  print $she;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="hepatitis" type="radio" value="no" <?php  print $nhe;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">TIROIDES</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="tiroides1" type="radio" value="si" <?php  print $sti;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="tiroides1" type="radio" value="no" <?php  print $nti;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">HIPOGLICEMIA</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="hipogli" type="radio" value="si" <?php  print $shi;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="hipogli" type="radio" value="no" <?php  print $nhi;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">DIABETES</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="diabetes1" type="radio" value="si" <?php  print $sdi;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="diabetes1" type="radio" value="no" <?php  print $ndi;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">ENF. PULMONAR </span></td>
                                            <td><div align="center" class="style3">
                                                <input name="pulmonar" type="radio" value="si" <?php  print $sep;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="pulmonar" type="radio" value="no" <?php  print $nep;?> />
                                            </div></td>
                                          </tr>
                                      </table></td>
                                      <td width="117"><table width="117" border="1">
                                          <tr>
                                            <td width="55"><span class="style3"></span></td>
                                            <td width="20"><span class="style3">SI</span></td>
                                            <td width="20"><span class="style3">NO</span></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">TBC</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="tbc1" type="radio" value="si" <?php  print $stbc;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="tbc1" type="radio" value="no" <?php  print $ntbc;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">E.A.P.</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="eap" type="radio" value="si" <?php  print $seap;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="eap" type="radio" value="no" <?php  print $neap;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">S.I.I.</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="sii" type="radio" value="si" <?php  print $ssii;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="sii" type="radio" value="no" <?php  print $nsii;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">ENF. MENTAL </span></td>
                                            <td><div align="center" class="style3">
                                                <input name="mental" type="radio" value="si" <?php  print $sen_m;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="mental" type="radio" value="no" <?php  print $nen_m;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">SISTEMA URINARIO </span></td>
                                            <td><div align="center" class="style3">
                                                <input name="sisu" type="radio" value="si" <?php  print $ssu;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="sisu" type="radio" value="no" <?php  print $nsu;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">CANCER</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="cancer1" type="radio" value="si" <?php  print $sca;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="cancer1" type="radio" value="no" <?php  print $nca;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">HERNIA</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="hernia" type="radio" value="si" <?php  print $sher;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="hernia" type="radio" value="no" <?php  print $nher;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">DERMATITIS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="dermatitis" type="radio" value="si" <?php  print $sder;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="dermatitis" type="radio" value="no" <?php  print $nder;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">ARTRITIS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="artritis1" type="radio" value="si" <?php  print $sart;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="artritis1" type="radio" value="no" <?php  print $nart;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">LUMBAGO</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="lumbago" type="radio" value="si" <?php  print $slu;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="lumbago" type="radio" value="no" <?php  print $nlu;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">TUNEL CARPIANO </span></td>
                                            <td><div align="center" class="style3">
                                                <input name="tunel" type="radio" value="si" <?php  print $stu;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="tunel" type="radio" value="no" <?php  print $ntu;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">VARICES M.M.I.I. </span></td>
                                            <td><div align="center" class="style3">
                                                <input name="mmii" type="radio" value="si" <?php  print $sva;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="mmii" type="radio" value="no" <?php  print $nva;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">TROMBOSIS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="trombosis" type="radio" value="si" <?php  print $stro;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="trombosis" type="radio" value="no" <?php  print $ntro;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">GOTA</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="gota" type="radio" value="si" <?php  print $sgo;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="gota" type="radio" value="no" <?php  print $ngo;?> />
                                            </div></td>
                                          </tr>
                                          <tr>
                                            <td><span class="style3">ALERGIAS</span></td>
                                            <td><div align="center" class="style3">
                                                <input name="alergias" type="radio" value="si" <?php  print $sale;?> />
                                            </div></td>
                                            <td><div align="center" class="style3">
                                                <input name="alergias" type="radio" value="no" <?php  print $nale;?> />
                                            </div></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                  </table></td>
                                  <td width="241"><table width="239" border="1">
                                    <tr>









                                      <td height="22" colspan="4"><div align="center" class="style3"><strong><u>REVISI&Oacute;N POR SISTEMA</u></strong> </div></td>
                                    </tr>
                                    <tr>
                                      <td width="109">&nbsp;</td>
                                      <td width="22" height="22" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">SI</div></td>
                                      <td width="20" height="22" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">NO</div></td>
                                      <td width="60">&nbsp;</td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">RESPIRATORIO</div></td>
                                      <td height="36" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps2" type="radio" value="si" <?php  print $sboton2;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps2" type="radio" value="no"<?php  print $nboton2;?> />
                                      </div></td>
                                      <td><div align="right" class="style3">
                                          <input name="rps_respiratorio" type="text" value="<?php  print $texto2;?>" size="10" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">CARDIOVASCULAR</div></td>
                                      <td height="36" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps3" type="radio" value="si"<?php  print $sboton3;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps3" type="radio" value="no"<?php  print $nboton3;?> />
                                      </div></td>
                                      <td><div align="right" class="style3">
                                          <input name="rps_cardiovascular" type="text" value=" <?php  print $texto3;?>" size="10" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">GASTROINTESTINALES</div></td>
                                      <td height="36" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps4" type="radio" value="si"<?php  print $sboton4;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps4" type="radio" value="no"<?php  print $nboton4;?> />
                                      </div></td>
                                      <td><div align="right" class="style3">
                                          <input name="rps_gastrointestinales" type="text" value="<?php  print $texto4;?>" size="10" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">GENITOURINARIAS</div></td>
                                      <td height="36" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps5" type="radio" value="si"<?php  print $sboton5;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps5" type="radio" value="no"<?php  print $nboton5;?> />
                                      </div></td>
                                      <td><input name="rps_genitourinarios" type="text"value="<?php  print $texto5;?>" size="10" /></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">OSTEOMUSCULARES</div></td>
                                      <td height="36" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps6" type="radio" value="si"<?php  print $sboton6;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps6" type="radio" value="no"<?php  print $nboton6;?> />
                                      </div></td>
                                      <td><div align="right" class="style3">
                                          <input name="rps_osteomusculares" type="text" value="<?php  print $texto6;?>" size="10" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">T. ENDOCRINOS Y METAB&Oacute;LICOS </span></td>
                                      <td height="52" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps7" type="radio" value="si"<?php  print $sboton7;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps7" type="radio" value="no"<?php  print $nboton7;?> />
                                      </div></td>
                                      <td><div align="right" class="style3">
                                          <input name="rps_endocrinos_metabolicos" type="text"value="<?php  print $texto7;?>" size="10" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td><div align="left" class="style3">PIEL Y FANERA </div></td>
                                      <td height="36" bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps8" type="radio" value="si"<?php  print $sboton8;?> />
                                      </div></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input name="rb_rps8" type="radio" value="no"<?php  print $nboton8;?> />
                                      </div></td>
                                      <td><div align="right" class="style3">
                                          <input name="rps_piel_fanera" type="text"value="<?php  print $texto8;?>" size="10" />
                                      </div></td>
                                    </tr>
                                  </table>
                                    <table width="241" border="1">
                                      <tr>
                                        <td width="137"><div align="center" class="style3"><strong><u>ENFERMEDAD PROFESIONAL</u> </strong></div></td>
                                        <td width="13"><span class="style3">SI</span></td>
                                        <td width="20"><span class="style3">
                                          <label>
                                          <input name="ep" type="radio" value="si" <?php  print $s_eprofe;?> />
                                          </label>
                                        </span></td>
                                        <td width="14"><span class="style3">NO</span></td>
                                        <td width="22"><input name="ep" type="radio" value="no" <?php  print $n_eprofe;?> /></td>
                                      </tr>
                                    </table>
                                    <table width="239" height="144" border="1">
                                      <tr>
                                        <th width="76" scope="col"><div align="center" class="style3">FECHA</div></th>
                                        <th width="147" scope="col"> <div align="center" class="style3">
                                            <input name="textfield10216" type="text" size="15" value="<?php  echo $fep;?>" />
                                        </div></th>
                                      </tr>
                                      <tr>
                                        <td><div align="center" class="style3">EMPRESA</div></td>
                                        <td><div align="center" class="style3">
                                            <input name="textfield10212" type="text" size="15" value="<?php  echo $eep;?>" />
                                        </div></td>
                                      </tr>
                                      <tr>
                                        <td><div align="center" class="style3">DIAGN</div></td>
                                        <td><div align="center" class="style3">
                                            <input name="textfield10213" type="text" size="15" value="<?php  echo $dep;?>" />
                                        </div></td>
                                      </tr>
                                      <tr>
                                        <td><div align="center" class="style3">INDEMNIZACION</div></td>
                                        <td><div align="center" class="style3">
                                            <input name="textfield10214" type="text" size="15" value="<?php  echo $iep;?>" />
                                        </div></td>
                                      </tr>
                                      <tr>
                                        <td height="26"><div align="center" class="style3">REUBICACI&Ograve;N</div></td>
                                        <td><div align="center" class="style3">
                                            <input name="textfield10215" type="text" size="15" value="<?php  echo $rep;?>" />
                                        </div></td>
                                      </tr>
                                    </table>
                                  </td>
                                  <td colspan="2"><table width="427" border="1">
                                    <tr>
                                      <td colspan="4"><div align="center" class="style3"><strong><u>CONCEPTO</u></strong></div></td>
                                    </tr>
                                    <tr>
                                      <td width="158"><span class="style3">Apto sin limitaciones o restricciones para el cargo
                                        <label></label>
                                      </span></td>
                                      <td width="73" bordercolor="#0099FF" bgcolor="#FFFFFF"><span class="style3"><span class="style2">
                                          <label>
                                          </span>
                                          <!--   </span>-->
                                          <div align="center" class="style3">
                                            <input type="checkbox" name="apto_sin" value="si" <?php  print $Sapto_sin_lim;?> />
                                          </div>
                                        <span class="style3">
                                          </label>
                                        </span></td>
                                      <td width="148"><span class="style3">Apto para trabajo en alturas </span></td>
                                      <td width="20"><input name="apto_para_trabajo" type="checkbox" value="si" <?php  print $Sapto_trabajo_alturas;?> /></td>
                                    </tr>
                                    <tr>
                                      <td><span class="style3">Apto con limitaciones o restricciones para el cargo </span></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="apto_con" value="si"<?php  print$Sapto_con_lim;?> />
                                      </div></td>
                                      <td><span class="style3">Apto para manipulacion de aliementos </span></td>
                                      <td><input name="apto_para_manipulacion" type="checkbox" value="si"<?php  print $Sapto_para_manipulacion;?> /></td>
                                    </tr>
                                    <tr>
                                      <td height="61"><span class="style3">Al examen de egreso no hay evidencia de enfermedad profesional </span></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"><div align="center" class="style3">
                                          <input type="checkbox" name="al_examen" value="si"<?php  print $Sal_examen;?> />
                                      </div></td>
                                      <td><span class="style3">Aplazado-Motivo
                                        <label> : </label>
                                        </span>
                                          <p class="style3">
                                            <textarea name="aplazado_motivo" cols="15" ><?php  echo $aplazado;?></textarea>
                                        </p></td>
                                      <td><input type="checkbox" name="aplazado_final" value="si" <?php  print $Saplazado_final?> /></td>
                                    </tr>
                                    <tr>
                                      <td height="198"><p class="style3">Observaciones y Recomendaciones</p>
                                          <p class="style3">
                                            <textarea name="textarea8" cols="20" rows="10" style="FONT-SIZE: 9px"><?php  echo $observaciones;?></textarea>
                                        </p></td>
                                      <td bordercolor="#0099FF" bgcolor="#FFFFFF"></td>
                                      <td><span class="style3">Restricciones y Limitaciones
                                        <textarea name="textarea10" cols="20" rows="10" ><?php  echo $recos;?></textarea>
                                      </span></td>
                                      
                                    </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="451" colspan="2"><table width="265" border="1">
                                    <tr>
                                      <td height="33" colspan="4" class="style3"><div align="center" class="style3"><u><strong>ANTECENDENTES FAMILIARES </strong></u></div></td>
                                    </tr>
                                    <tr>
                                      <td width="107" height="33" class="style3"><u><span class="style3">ENFERMEDAD</span></u></td>
                                      <td width="20" class="style3"><div align="center" class="style3"><u>SI</u></div></td>
                                      <td width="20" class="style3"><div align="center" class="style3"><u>NO</u></div></td>
                                      <td width="90" class="style3"><div align="center" class="style3"><u>PARENTESCO</u></div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">HTA</span></td>
                                      <td class="style3"><span class="style3">
                                      <label>
                                     
                                        <div align="center" class="style3">
                                          <input name="hta" type="radio" value="si" <?php  print $shta_f;?> />
                                        </div>
                                        <span class="style3">
                                        </label>
                                        </span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="hta" type="radio" value="no" <?php  print $nhta_f;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield1021514" type="text" size="15" value="<?php  echo $phta;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">INFARTO/CARDIOPAT&Igrave;A</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="infcar" type="radio" value="si" <?php  print $sinfar;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="infcar" type="radio" value="no" <?php  print $ninfar;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield1021515" type="text" size="15" value="<?php  echo $pinfarto;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">ACV</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="acv" type="radio" value="si" <?php  print $sacv;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="acv" type="radio" value="no" <?php  print $nacv;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield1021516" type="text" size="15" value="<?php  echo $pacv;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">DIABETES</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="diabetes" type="radio" value="si" <?php  print $sd;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="diabetes" type="radio" value="no" <?php  print $nd;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield1021517" type="text" size="15" value="<?php  echo $pdiabetes;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">ASMA</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="asma" type="radio" value="si" <?php  print $sas;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="asma" type="radio" value="no" <?php  print $nas;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield1021518" type="text" size="15" value="<?php  echo $pasma;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">TBC</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="tbc" type="radio" value="si" <?php  print $st;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="tbc" type="radio" value="no" <?php  print $nt;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield1021519" type="text" size="15" value="<?php  echo $ptbc_f;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">ARTRITIS</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="artritis" type="radio" value="si" <?php  print $sart_f;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="artritis" type="radio" value="no" <?php  print $nart_f;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield10215192" type="text" size="15" value="<?php  echo $part;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">ENF. MENTAL </span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="enfment" type="radio" value="si" <?php  print $sem_f;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="enfment" type="radio" value="no" <?php  print $nem_f;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield10215193" type="text" size="15" value="<?php  echo $pem;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">CANCER</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="cancer" type="radio" value="si" <?php  print $scan;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="cancer" type="radio" value="no" <?php  print $ncan;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield10215194" type="text" size="15" value="<?php  echo $pcan;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">TIROIDES</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="tiroides" type="radio" value="si" <?php  print $sti_f;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="tiroides" type="radio" value="no" <?php  print $nti_f;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield10215195" type="text" size="15" value="<?php  echo $pti_f;?>" />
                                      </div></td>
                                    </tr>
                                    <tr>
                                      <td class="style3"><span class="style3">OTROS</span></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="otros" type="radio" value="si" <?php  print $sotros;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="otros" type="radio" value="no" <?php  print $notros;?> />
                                      </div></td>
                                      <td class="style3"><div align="center" class="style3">
                                          <input name="textfield10215196" type="text" size="15" value="<?php  echo $potros;?>" />
                                      </div></td>
                                    </tr>
                                  </table></td>
                                  <td colspan="2"><span class="style3">DESCRIPCION:
                                      <label> <br />
                                      <textarea name="inf_examen_fisico2" cols="63" rows="25"><?php  echo $inf_examen_fisico;?></textarea>
                                      </label>
                                  </span></td>
      </tr>
                              </table>                                
                                </td>

                              </tr>

<tr>

  <td width="132" height="44"></td>
<p><a href="bloqueDeRetorno.php">Regresar</a></p>
</tr><tr>
                              
</body>
</html>





